[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Start rtorrent on bootup in Squeeze

On 04/07/2011 10:15, Ramon Hofer wrote:
Hi all

I'd like to start rtorrent automatically when the system boots.
Does anybody have a init.d script for that?

I have the perfect script for you!

Here it is:


You must copy it in /etc/init.d and more importantly name it /etc/init.d/rtorrent-user.<username> where <username> is your actual username. Hence, you can set it up for any number of users on the same system. Then, the script will auto-detect the username on whoes it will run, based on its file name. rtorrent will run in a (per user) screen session, all is explained in the script. I use this since two years now (to automatically share Debian/Ubuntu cd isos) and it seems really robust and friendly!

To be clear, when using it for multiple users, say john and mike, you'll do the following:

  cd /tmp
  wget http://users.klvb-larve.org/nico/bin/bash/rtorrent-user.username
  cp rtorrent-user.username /etc/init.d/rtorrent-user.john
  cp rtorrent-user.username /etc/init.d/rtorrent-user.mike
  update-rc.d rtorrent-user.john defaults
  update-rc.d rtorrent-user.mike defaults

Then start the services:

  /etc/init.d/rtorrent-user.john start
  /etc/init.d/rtorrent-user.mike start

Take care to have well configured ~/.rtorrent for each user to avoid heavy traffic.


PS: note that you can just symlink the files instead of copying them since there's nothing to change inside of them, except maybe the following line if upstart complains too much:

- # Provides:          rtorrent
+ # Provides:          rtorrent.joe

Reply to: