Daily Ubuntu / Linux news and application reviews.

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:
«
Next
Newer Post
»
Previous
Older Post