rtorrent service automatic restart

Suggestions for features and software you would like to see in DietPi, goes here.
Post Reply
KamikazeePL
Posts: 22
Joined: Sat Nov 21, 2020 5:57 pm

rtorrent service automatic restart

Post by KamikazeePL »

Could add option to systemd of rtorrent to automaticly restart service?
Sometimes my rtorrent shuts down and I need it manualy restart it from ssh.
User avatar
WarHawk
Posts: 773
Joined: Thu Jul 20, 2017 8:55 am

Re: rtorrent service automatic restart

Post by WarHawk »

poking around found this
https://bbs.archlinux.org/viewtopic.php ... 8#p1451838

It has autorestart on failure in the systemd script
User avatar
Joulinar
Posts: 5619
Joined: Sat Nov 16, 2019 12:49 am

Re: rtorrent service automatic restart

Post by Joulinar »

basically you could extend rtorrent.service

for the [Unit]section add

Code: Select all

# Restart attempt only 5 times
StartLimitIntervalSec=60
StartLimitBurst=5
for the [Service] section add

Code: Select all

Restart=on-failure
RestartSec=5
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Post Reply