https://github.com/codenoid/systemd-gen
systemd service generator
https://github.com/codenoid/systemd-gen
systemd systemd-generator systemd-service
Last synced: 8 months ago
JSON representation
systemd service generator
- Host: GitHub
- URL: https://github.com/codenoid/systemd-gen
- Owner: codenoid
- Created: 2020-01-10T09:10:05.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-01-10T10:04:36.000Z (about 6 years ago)
- Last Synced: 2023-03-03T06:09:22.209Z (almost 3 years ago)
- Topics: systemd, systemd-generator, systemd-service
- Language: Go
- Size: 6.84 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# systemd-gen

## Download
1. Download binary (Built on Ubuntu 18.04) from [release page](https://github.com/codenoid/systemd-gen/releases/download/0.0.1/systemd-gen)
2. `go get -u github.com/codenoid/systemd-gen`
```bash
sudo wget https://github.com/codenoid/systemd-gen/releases/download/0.0.1/systemd-gen
sudo mv systemd-gen /usr/bin
# alright
```
## How to use it
```bash
# username is logged username
$ sudo systemd-gen service-name username '/path/to/project/dir' '/usr/bin/python3 something.py'
Service File Created.
$ sudo service service-name status
● service-name.service - service-name Service
Loaded: loaded (/etc/systemd/system/service-name.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2020-01-10 16:43:29 WIB; 14min ago
Main PID: 3667 (python3)
Tasks: 2 (limit: 4915)
CGroup: /system.slice/service-name.service
├─3667 /usr/bin/python3 something.py
└─3683 /usr/bin/python3 something.py
Jan 10 16:43:29 host-name systemd[1]: Started service-name Service.
```