restart rtorrent every 6 hours

This commit is contained in:
Beth Parker 2019-05-12 22:00:11 -05:00
parent 6eda38ede5
commit 4160f10ebe

View file

@ -5,13 +5,14 @@
[Service]
User=root
Type=forking
Type=notify
KillMode=none
ExecStartPre=/usr/bin/bash -c 'if test -e /mnt/video/rtorrent/.session/rtorrent.lock && test -z `pidof rtorrent`; then rm -f /mnt/video/rtorrent/.session/rtorrent.lock; fi'
ExecStart=/bin/bash -c 'sleep 10;/usr/bin/screen -dmfa -S rtorrent /usr/bin/rtorrent -b `ifconfig tun0 | grep "inet " | grep -Po "(?<=inet).*(?=net)"`'
ExecStop=/usr/bin/bash -c "test `pidof rtorrent` && killall -w -s 2 /usr/bin/rtorrent"
WorkingDirectory=/mnt/video/rtorrent
Restart=on-failure
WatchdogSec=420
Restart=always
[Install]
WantedBy=default.target