Jump to content

Starting utorrent server as script


faderhun

Recommended Posts

I created a script on debian so i can run it as startup:

Create a file in etc/init.d/ut.sh

#/etc/init.d/touch ut.sh

copy and paste this:

# !/bin/sh

# utorrent server

case "$1" in

start)

# Startup utorrent servers.

cd /opt/bittorrent-server-v3_0/

exec su username -c "/opt/bittorrent-server-v3_0/utserver&"

;;

stop)

killall utserver

;;

*)

echo "Usage: $0 { start | stop }"

;;

esac

exit 0

Edit your username

Add the script to rc.d

#update-rc.d ut.sh defaults

If you want to remove it from rc.d

#update-rc.d -f ut.sh remove

Link to comment
Share on other sites

  • 2 weeks later...
I created a script on debian so i can run it as startup:

mine script on Debian: create file "utorrent" in /etc/init.d/ and add +x privilages

here is mine script: http://pastebin.com/6FtjZ25w

create catalogs "settings" and "conf" and give right privilages "766"

copy "webui.zip" file from "/path/to/utorrent/" to "/path/to/utorrent/settings/" catalog

to start automatically:

update-rc.d utorrent defaults

to remove:

update-rc.d -f utorrent remove

my "utserver.conf" file:

dir_active: /var/tmp/

Link to comment
Share on other sites

I'm having a strange issue.

When i try to use the init.d script (the second one, so far i haven't tried the first one yet) the webui fails to load. I get this:

"The µTorrent WebUI does not seem to be installed. Click here to try to install it, or see the guide for more details."

but when i run it manually, all is well.

I can't figure out what i did wrong....

Link to comment
Share on other sites

  • 4 weeks later...

well, that worked but now i have a different problem.

For some reason, it doesn't seem to be loading from my config file.

I've set up my directories like so:

/opt/bittorrent-server-v3_0

/opt/bittorrent-server-v3_0/conf

/opt/bittorrent-server-v3_0/settings

my config file is at

/opt/bittorrent-server-v3_0/conf/utserver.conf

but for some reason, it doesn't load any settings i make in the config file.

the options line from the script reads as follows:

OPTIONS="-LOGFILE -settingspath /opt/bittorrent-server-v3_0/settings -configfile /opt/bittorrent-server-v3_0/conf/utserver.conf"

all files are owned by the utor user, which is also set in the script.

any ideas?

Link to comment
Share on other sites

well, that worked but now i have a different problem.

For some reason, it doesn't seem to be loading from my config file.

[cut]

any ideas?

your config seems OK, but "utserver.conf" file works only at first time. If utorrent starts up, it creates .dat files, and i think it does not read "utserver.conf" file any more, but You can simply do changes by GUI.

Ps. sorry but my english is very poor

Link to comment
Share on other sites

"utserver.conf" file works only at first time. If utorrent starts up, it creates .dat files, and i think it does not read "utserver.conf" file any more, but You can simply do changes by GUI.

uTorrent server reads utserver.conf every time it starts. Not all of the settings are applied every time. The settings you can edit via the web UI or HTTP interface aren't applied every time, and the non-editable settings are applied every time.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...