Automatic Start Utorrent Server on Open SUSE 12.3

Hello I am using open suse 12.3 KDE, I just installed the utorrent server to run natively on my distro but i would like to make it start automatically when my computer starts, could any one help me on how to do this, i am a bit noob at linux so plz try to be as specific as you can

Thanks
Mbi0

Hello and welcome here.

I am still on 12.2, thus 12.3 could be different, but I can not find abything utorrent in the standard repos.
This would mean that you installed it from elsewhere, but you did not explain anything. For standard server deamons there is a standard way how to start them using YaST, but in this case it will be difficult to help you when we have no idea what you installed, nor what documentation came with it (was there any, and did you read it?), etc.

Hi hcvv

Thanks alot for your quick answer, i did follow some steps described in here

[installation - How to install utorrent step by step? - Ask Ubuntu](http://askubuntu.com/questions/104094/how-to-install-utorrent-step-by-step)

The only diffrence is that instead of downloading the file the way it says there i went directly to utorrent page and downloaded the latest version directly from there ( utorrent-server-3.0-ubuntu-10.10-27079.tar.gz )
Direct Link to what i Downloaded is in here

I will be thank full for any help or advice you could give me.

It is nice you want us to read that link, but we want to know what you did. As exactly as possible and wherever possible backed by real computer text.

Now, when you think that building and installing it went without a glitch, I will not ask you to post the build and install commands/output, but you must be very sure that was OK of course.

But you did not answer my question about the documentation. As this is build by you, it is not an openSUSE oriented RMP (it is no RPM at al) and as such it will probably not install itself in a way that YaST can find it as a service. We need to know what the documentation says about starting it.

You don’t build and install uTorrent server for Linux. You just extract it, and run

cd utserver-server-v3_0
./utserver

That starts the server, then you open your browser, and enter

http://localhost:8080

to start the GUI.

Basicly what i did was :

  • Download the tar.gz file
    -Extracted the contents to a folder named /opt
    -set permissions 777 to the folder /opt/utorrent-server-v3_0
    -install package libssl0.9.8
    -Build and install by running the ./utorrent command

As for all this it showed no errors at all, as for the documentation , I didnt see any documentation on the utorrents website or the utorrent download that talks about auto start, mostly it says that to start Utorrent Server you will need to run in terminal the following :

 utserver -settingspath /opt/utorrent-server-v3_0 

after this the server is started it all runs silk and smooth until i turn my pc and need to re do this last step on terminal so server starts.

hope i responded correctly since i am a complete noob at this hehe

My conclusion is that your real question is:

How do i run

utserver -settingspath /opt/utorrent-server-v3_0

automaticaly at each boot.

Try puting that line in /etc/init.d/boot.local
May be it is best to add a complete path in from of utserver.

hcvv , you are right on that, real question is how to run

utserver -settingspath /opt/utorrent-server-v3_0

automaticaly at each boot.

As i am a total noob could you point me out to know how can I edit that file , maybe give me some guide or something for me to learn a bit.

I am sure i need to open that file with a text editor via terminal , but i dont know the commands to do it, could you help me with it ??

Thanks alot in advance

mbi0

You may use e.g. vi in a terminal, but you can also use the KDE “execute a command” from the main menu and do

kdesu kwrite /etc/init.d/boot.local

when you are more fluent with kwrite.

Ok , so I have run in terminal

kdesu kwrite /etc/init.d/boot.local

it opened this with Kwrite

#! /bin/sh#
# Copyright (c) 2002 SuSE Linux AG Nuernberg, Germany.  All rights reserved.
#
# Author: Werner Fink, 1996
#         Burchard Steinbild, 1996
#
# /etc/init.d/boot.local
#
# script with local commands to be executed from init on system startup
#
# Here you should add things, that should happen directly after booting
# before we're going to the first run level.
#

So i just added the code

utserver -settingspath /opt/utorrent-server-v3_0

so It looks like this

   #! /bin/sh#
# Copyright (c) 2002 SuSE Linux AG Nuernberg, Germany.  All rights reserved.
#
# Author: Werner Fink, 1996
#         Burchard Steinbild, 1996
#
# /etc/init.d/boot.local
#
# script with local commands to be executed from init on system startup
#
# Here you should add things, that should happen directly after booting
# before we're going to the first run level.
#


utserver -settingspath /opt/utorrent-server-v3_0

i am missing something else ??

After All this posts , and after the restart, I can tell that it worked , utorrent server started automatically with out any problem at all

Many thanks guys for all your Help.

Mods if possible could we mark this one as SOLVED…

I don’t think there is a formal “solved” option, other than inserting “[SOLVED]” to the Title when responding.

If you really want to help other forum users notice the helpful thread (contains information that actually solves a problem) then rate it!

Rated threads are generally the way to flag a thread as solved. You can rate threads with the Rate This Thread pulldown menu near the top right of that particular thread.

Many thanks for clearing this out for me saultdon , im still very new around here I will add the [SOLVED] label to the title of this thread and rate it.

It is OK when you tell in a thread that you are satisfied with the solution (like you did here).
It is also appreciated if it is clear from the thread what exactly you did after you read all the advices in a thread to solve your problem (like you did here) so that others can benifit.
It is also OK to edit the title, but not many do it

You are welcome and glad it works to your satisfaction.

   #! /bin/sh#
# Copyright (c) 2002 SuSE Linux AG Nuernberg, Germany.  All rights reserved.
#
# Author: Werner Fink, 1996
#         Burchard Steinbild, 1996
#
# /etc/init.d/boot.local
#
# script with local commands to be executed from init on system startup
#
# Here you should add things, that should happen directly after booting
# before we're going to the first run level.
#

utserver -settingspath /opt/utorrent-server-v3_0

i am missing something else ??

Do you want to be running it as root? If not, you can change it to this:

 su mbi0 -l -c "utserver -settingspath /opt/utorrent-server-v3_0"

For security reasosn what would be better ?? i suppose its not as root or is it no problem at all ??

I’ve never used utserver but you generally don’t want to run as root unless you need to. The person in your link doesn’t run it as root.

Guess its true and its better to run it as a User


#!/bin/sh
### BEGIN INIT INFO
# Provides:          utserver
# Required-Start:    $local_fs $remote_fs $network
# Required-Stop:     $local_fs $remote_fs $network
# Default-Start:     2 3 5
# Default-Stop:      0 1 4 6
# Short-Description: Start or stop the utorrent server.
### END INIT INFO

USER=user
NAME=utserver
PIDFILE=/var/run/$NAME.pid
DIR=/opt/utorrent-server-v3_0
PIDFILE=$DIR/$NAME.pid
CONF_FILE=$DIR/utserver.conf
OPTIONS="-daemon -pidfile $PIDFILE -configfile $CONF_FILE"
DAEMON=$DIR/$NAME
STOP_TIMEOUT=5

 -x $DAEMON ] || exit 1

. /etc/rc.status

cd $DIR
case "$1" in
    start)            
        echo "Starting $NAME daemon"
        su $USER -c "${DAEMON} ${OPTIONS}"
         # Remember status and be verbose
        rc_status -v
        ;;
    stop)
        echo "Stopping $NAME daemon"
        pkill ${NAME}
        pgrep -U $USER $NAME >/dev/null || rm -f $PIDFILE >/dev/null
         # Remember status and be verbose
        rc_status -v
        ;;
    status)
        checkproc -p ${PIDFILE} ${DAEMON} && echo -n "$NAME is running! "
         # Remember status and be verbose
        rc_status -v
        ;;
    restart)
        echo "Restarting $NAME daemon" "$NAME"
        $0 stop
        sleep 2
        $0 start
        ;;
    *)
        echo "Usage: $0 {start|stop|restart|status}"
        exit 2
        ;;
esac

exit 0

1st cut draft. using startproc doesn’t seem to work reliably yet. using opensuse 12.3.
Change DIR, USER, CONF_FILE as needed.

p