Jump to content

OpenSUSE 11.3 & utserver - Working Great!


Superman710e

Recommended Posts

Hi All,

Thanks of all, thanks a million for this linux server version! It's exactly what I've been looking for.

I searched so long for a linux native client with a web interface that worked relatively like uTorrent. Some came close, but none had all the features, particularly the appending the label to the completed directory. This is so useful to keep my downloads organized and sorted. I was using the windows version running on wine with an autologin account. It worked quite well, however required me to have a gui account logged in at all times.

Anyway, with the recent build it works great. Thought I would just provide some notes that might be helpful for others.

Here's my directory structure:


/opt/utserver/bin/utserver
/opt/utserver/docs/
/etc/opt/utserver/utserver.conf
/var/opt/utserver/settings/webui.zip
/var/opt/utserver/settings/
/var/opt/utserver/log/

I'm running the command like this (from the init script, using startproc):

startproc -p /var/run/utserver/utserver.pid -u 1001 -g 100 /opt/utserver/bin/utserver -configfile /etc/opt/utserver/utserver.conf -settingspath /var/opt/utserver/settings -logfile /var/opt/utserver/log/utserver.log

Here's the init script I'm using. (Lifted the template from the Cool Solutions site.)


#! /bin/sh
#
# Copyright (c) 2005 John Doe
# All rights reserved.
#
# Author: John Doe, 2005
#
# /etc/init.d/utserver
# and its symbolic link
# /usr/sbin/rcutserver
#
### BEGIN INIT INFO
# Provides: utserver
# Required-Start: $network
# Required-Stop:
# Default-Start: 3 5
# Default-Stop: 0 1 2 6
# Short-Description: utserver daemon, providing a bittorrent service
# Description: The utserver daemon is network bittorrent
# service. We want it to be active in runlevels 3
# and 5, as these are the runlevels with the network
# available.
### END INIT INFO
#
# Check for missing binaries
UT_BIN=/opt/utserver/bin/utserver
test -x $UT_BIN || { echo "$UT_BIN not installed";
if [ "$1" = "stop" ]; then exit 0;
else exit 5; fi; }

# Check for existence of needed config file and read it
UT_CONFIG=/etc/opt/utserver/utserver.conf
test -r $UT_CONFIG || { echo "$UT_CONFIG not existing";
if [ "$1" = "stop" ]; then exit 0;
else exit 6; fi; }

UT_PID=/var/run/utserver/utserver.pid
UT_SETTINGS=/var/opt/utserver/settings
UT_LOG=/var/opt/utserver/log/utserver.log

# Read config
#. $UT_CONFIG

#
# Load the rc.status script for this service.
. /etc/rc.status

# Reset status of this service
rc_reset

#

case "$1" in
start)
echo -n "Starting utserver "
## Start daemon with startproc(8). If this fails
## the return value is set appropriately by startproc.
#startproc -u 1001 -g 100 $UT_BIN
# su - -c /home/cool/bin/utserver.sh cool
startproc -p ${UT_PID} -u 1001 -g 100 ${UT_BIN} -configfile ${UT_CONFIG} -settingspath ${UT_SETTINGS} -logfile ${UT_LOG}

# Remember status and be verbose
rc_status -v
;;
stop)
echo -n "Shutting down utserver "
## Stop daemon with killproc(8) and if this fails
## killproc sets the return value according to LSB.

killproc -TERM ${UT_BIN}

# Remember status and be verbose
rc_status -v
;;
restart)
## Stop the service and regardless of whether it was
## running or not, start it again.
$0 stop
$0 start

# Remember status and be quiet
rc_status
;;
reload)
# If it supports signaling:
echo -n "Reload service utserver "
killproc -HUP ${UT_BIN}
#touch /var/run/UT.pid
rc_status -v

## Otherwise if it does not support reload:
#rc_failed 3
#rc_status -v
;;
status)
echo -n "Checking for service utserver "
## Check status with checkproc(8), if process is running
## checkproc will return with exit status 0.

# Return value is slightly different for the status command:
# 0 - service up and running
# 1 - service dead, but /var/run/ pid file exists
# 2 - service dead, but /var/lock/ lock file exists
# 3 - service not running (unused)
# 4 - service status unknown :-(
# 5--199 reserved (5--99 LSB, 100--149 distro, 150--199 appl.)

# NOTE: checkproc returns LSB compliant status values.
checkproc ${UT_BIN}
# NOTE: rc_status knows that we called this init script with
# "status" option and adapts its messages accordingly.
rc_status -v
;;
*)
## If no parameters are given, print which are available.
echo "Usage: $0 {start|stop|status|restart|reload}"
exit 1
;;
esac

#
rc_exit

Hope this proves helpful.

Thanks,

Jason

Additionally, here's my utserver.conf


ut_webui_port: 8181
#webui_dir_files: /opt/utserver/bin/
dir_active: /mnt/data/Torrents/Incomplete/
dir_completed: /mnt/data/Torrents/Complete/
dir_torrent_files: /var/opt/utserver/torrents/
dir_autoload: /mnt/data/autoload/
dir_autoload_delete: true
token_auth_enable: false

I have several symbolic links in my "Complete" directory that point to actual locations of the data, which the label append function will make use of. I've found that I can create labels with directory slashes in it, and whole subdirectories will be created. IE: label: ISO/OpenSUSE/11.3.

I found that the webui.zip file needs to be in the settings directory set by

-settingspath

no matter what you put in the utserver.conf.

Also the utserver doesn't seem to write a pid file, so the pid setting you see doesn't do anything. Also, the

token_auth_enable:

setting doesn't seem to be respected.

Should also add, this is running on the 32-bit version of OpenSUSE 11.3, on a system with a Pentium 4 2.4Ghz HT CPU, and 2GB of RAM.

Link to comment
Share on other sites

Ok. I'm sure it will be useful to somebody.

I just installed it in my home directory. To run it I open a terminal, navigate to the bittorent-server-v3_0 directory and enter ./utserver, open a browser window and enter localhost:8080/gui, enter the username and password and I'm all set. I just gotta remember not to open a web page in that tab, when I'm surfing. :lol:

Running it on the 64-bit version of openSUSE 11.2 on a system with an AMD 3000+ 1.8GHz CPU and 2GB of RAM.

Link to comment
Share on other sites

Thanks for the detailed report.

Additionally, here's my utserver.conf


#webui_dir_files: /opt/utserver/bin/

I found that the webui.zip file needs to be in the settings directory set by

-settingspath

no matter what you put in the utserver.conf.

That setting isn't meant for that purpose; I've removed it from the documentation because it is irrelevant to the server product, although it is still mentioned in the most recent release since that happened before I modified the documentation. There currently isn't a way to specify the location of webui.zip; I've added that to our list of requested features to be prioritized.

Also the utserver doesn't seem to write a pid file, so the pid setting you see doesn't do anything.

I've added that to our list of requested features to be prioritized.

Also, the

token_auth_enable:

setting doesn't seem to be respected.

I'll investigate that.

Link to comment
Share on other sites

Thanks for the detailed report.

You're welcome! Thanks for your replies, etc!

I mentioned in my "bug report" in the troubleshooting section that I thought the webui_dir setting might not be relevant to this setting. It works fine putting it in the -settingspath location, however I guess this should be documented! (http://forum.utorrent.com/viewtopic.php?id=84352)

All in all though it is working pretty sweet! :D :cool:

Link to comment
Share on other sites

very nice post superman! :) i have opensuse 11.3 and i'm going to try your init config. i still want to wait until rpm and deb packages are ready, and utorrent linux goes stable, before i use it on a regular basis. your first post should prove useful for when packages are made!

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...