LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   rtorrent auto-restart - can I do it? (https://www.linuxquestions.org/questions/linux-software-2/rtorrent-auto-restart-can-i-do-it-661666/)

NetRAVEN5000 08-09-2008 05:25 PM

rtorrent auto-restart - can I do it?
 
Hello,

I am setting up rtorrent to run full-time on a server in my basement (I've done this in the past and it works well - it's nice because then I can seed 24/7 without my desktop being on).

I was wondering, is there any way to have rtorrent restart my downloads automatically every day? I know there's many options I can schedule in the .rtorrent.rc file but if that's one of them, I don't know what the command is. I want it to restart because some trackers I use keep track of my upload ratio, but they don't log it until the client sends a signal to drop or reconnect.

Can I do that? Azureus can do it, but I don't want to set that up on the server - rtorrent's much cleaner and less memory thirsty with Azureus requiring Java and such.

MS3FGX 08-11-2008 01:46 AM

Are you looking for some kind of command to force rtorrent to restart the active torrents, or do you just want to kill the running rtorrent process and start a new one?

NetRAVEN5000 08-11-2008 11:04 AM

I was looking for a way to just have it pause all downloads, and then resume all, so that all the trackers would be contacted again and would have updated info to calculate my share ratio.

I definitely don't want to just kill the session - I want it to stop the torrents cleanly.

It doesn't look like there's really a way to do that using just rTorrent's scheduler - but I found out that "killall" can also send just a SIGINT signal which will tell the program to shutdown cleanly, and so I set up a cronjob to run a script that does this, closes that "screen" session and then starts rTorrent in a "screen" session again (so I can monitor it from my computer).

I'd rather just have rTorrent stop and restart the torrents on its own but it looks like there's no option yet to do that.

MS3FGX 08-11-2008 11:10 AM

Quote:

I definitely don't want to just kill the session - I want it to stop the torrents cleanly.
Unless you specifically tell it to, Linux won't just cut the cord on a process and force it to end. The default behavior is to send the process a request to close, which gives the process time to cleanly close out.

Now, it is up to the developer of each individual application to include support for cleanly closing when it receives this signal. I don't know if rtorrent is designed with this behavior, but it is the standard so it should be.

NetRAVEN5000 08-11-2008 11:15 AM

Quote:

Originally Posted by MS3FGX (Post 3243710)
Now, it is up to the developer of each individual application to include support for cleanly closing when it receives this signal. I don't know if rtorrent is designed with this behavior, but it is the standard so it should be.

It does - it performs a normal shutdown when it receives the SIGINT signal:
http://libtorrent.rakshasa.no/wiki/R...Signalhandlers


All times are GMT -5. The time now is 01:15 AM.