add restart cmd, add example service file

This commit is contained in:
Ondřej Hruška 2021-08-22 19:32:59 +02:00
parent 0403d1ef71
commit 344b984e10
No known key found for this signature in database
GPG key ID: 2C5FD5035250423D
2 changed files with 18 additions and 0 deletions

View file

@ -3,3 +3,7 @@
build: build:
cargo build --release cargo build --release
ln -sf ./target/release/fedigroups . ln -sf ./target/release/fedigroups .
# if you have a service installed...
restart:
sudo systemctl restart fedigroups

View file

@ -0,0 +1,14 @@
[Unit]
Description=fedigroups daemon
After=network.target
[Service]
User=bot
SyslogIdentifier=fedigroups
WorkingDirectory=/srv/bots/fedigroups/
ExecStart=/srv/bots/fedigroups/fedigroups -v
Restart=always
RestartSec=15
[Install]
WantedBy=multi-user.target