27 November 2012

Daemonizing rtorrent

Background

I've been using rtorrent for many years as my client of choice, mostly because it was the only ncurses client out there1, but also I stuck with it because it's really lightweight and powerful.

I always just ran rtorrent as my own user in a tmux2 session, but now I've set up a PHP front end to rtorrent using nginx/fast-cgi/rutorrent to enable others in my house to use the server for downloading... Which became a problem after a restart because rtorrent was no longer running.

The answer (of course) is to write an init script. But I also still wanted to continue to use rtorrent the way I'm accustomed to - on the command line in a tmux session.

There's a bunch of scripts out there on the interwebs, but they all use screen. I use tmux.

The Init Script

Original credit3

:x


  1. Maybe there is now. This was in 2006. 

  2. Back in 2006, this was screen :) 

  3. http://libtorrent.rakshasa.no/attachment/wiki/RTorrentCommonTasks/rtorrentInit.sh 


Tagged in sysadmin