Re: Start rtorrent on bootup in Squeeze
On 04/07/2011 10:15, Ramon Hofer wrote:
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
To be clear, when using it for multiple users, say john and mike, you'll do the following:
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:
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