systemd: first attempt at matterbridge restarter timer

Ref: #98
This commit is contained in:
Aminda Suomalainen 2021-11-21 16:52:14 +02:00
parent 4f50f4a367
commit 29f7cf6b98
Signed by: Mikaela
GPG Key ID: 99392F62BAE30723
2 changed files with 26 additions and 0 deletions

View File

@ -0,0 +1,16 @@
[Unit]
Description=Matterbridge Daemon
After=network-online.target systemd-resolved.service
#oragono.service
# ^--v add these if running Ergo (previously Oragono) on the same host
#Wants=oragono.service
[Service]
Environment="PATH=/home/matterbridge/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin"
ExecStart=/home/matterbridge/.local/bin/matterbridge -debug -conf /home/matterbridge/matterbridge.toml
Restart=always
RestartSec=5s
User=matterbridge
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,10 @@
[Unit]
Description=Restart Matterbridge daemon daily at 05 Finnish time
[Timer]
OnCalendar=*-*-* 05:00:00 Europe/Helsinki
RandomizedDelaySec=1h
Persistent=true
[Install]
WantedBy=timers.target