Powered By

Powered by Blogger

Senin, 28 Februari 2011

Start uTorrent Server As A Daemon With This Upstart Script

uTorrent server Linux

I've recently built a small home server powered by Ubuntu and wanted to give uTorrent Server for Linux a try. I needed a way to demonize uTorrent so it starts automatically and I can easily start/stop it so I've used an upstart script (found here) for this. Here's exactly how to do it:

To create an upstart script for uTorrent, move all the uTorrent files to the /home/yourusername/.utorrent folder, then run the following command:

sudo nano /etc/init/utorrent.conf
(replace "nano" with your favourite editor)

and copy/paste the following code:

description "utorrent startup script"

start on (local-filesystems and started dbus and stopped udevtrigger)
stop on runlevel [016]

script
cd /home/yourusername/.utorrent
exec su yourusername -c "/home/yourusername/.utorrent/utserver"
end script

Of course, replace "yourusername" with your username in the commands above. Now there's only one step left:
sudo ln -s /lib/init/upstart-job /etc/init.d/utorrent

From now on you can start/stop uTorrent using the following commands:
sudo start utorrent
sudo stop utorrent

Also see:

1 komentar:

  1. Resources like the one you mentioned here will be very useful to me ! I will post a
    link to this page on my blog. I am sure my visitors will find that very useful
    Free softwares

    BalasHapus