restart rtorrent every 6 hours
This commit is contained in:
parent
6eda38ede5
commit
4160f10ebe
1 changed files with 3 additions and 2 deletions
|
@ -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
|
Loading…
Add table
Reference in a new issue