Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gdvalle/mkservice
A CLI tool to create a simple system service.
https://github.com/gdvalle/mkservice
Last synced: about 1 month ago
JSON representation
A CLI tool to create a simple system service.
- Host: GitHub
- URL: https://github.com/gdvalle/mkservice
- Owner: gdvalle
- License: mit
- Created: 2022-01-01T22:34:19.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-07-16T17:00:25.000Z (over 1 year ago)
- Last Synced: 2024-11-07T19:49:33.921Z (3 months ago)
- Language: Rust
- Size: 14.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# mkservice
A CLI utility to stamp out a basic systemd service.
## Usage
```
USAGE:
mkservice [OPTIONS] [COMMAND]...ARGS:
...OPTIONS:
-e, --env
-h, --help Print help information
--level [default: system] [possible values: user, system]
-V, --version Print version information
```An example:
```
mkservice --env LOG_LEVEL=debug --env SECRET=abc myprogram /usr/local/bin/myprogram -- pos_arg --flag-arg
```Would write out `/etc/systemd/system/myprogram.service`, reload systemd, and enable the service for start on next boot:
```ini
[Unit]
Description=myprogram
[Install]
WantedBy=multi-user.target
[Service]
Environment=LOG_LEVEL=debug
Environment=SECRET=abc
ExecStart="/usr/local/bin/myprogram" "pos_arg" "--flag-arg"
Type=simple
```