|
|
|

28-08-2002, 05:20
|
|
-= TeamSpeak User =-
|
|
Join Date: Aug 2002
Location: Stanford, CA
Posts: 16
|
|
|
Control script for TS2 (For Debian users)
Here is a script I wrote which sits in /etc/init.d, using the skeleton style and start-stop-daemon. Note the locations of the files. I also moved all the documentation into /usr/share/doc/tss2, with the permission style of the other packages.
About -DB. I heard that it could be broken if you change the name, which is why it's still server.db. I was able to successfully log into a ts2 server this created, however I am not familiar with what the server.db authenticates, so it may still be broken. I will investigate into this further.
PS: Looks like the formatting was a bit messed up. Oh well, tabs can be created on your side.
---------------------------------------------------
#! /bin/sh
#
# Debian-ized script to start/stop/restart TeamSpeak 2 Server.
#
# Created by Adar Dembo, 2002
#
# Modified: 8/31/02
# ---------
# + Changed pidfile location to /var/run/tss2 (Thanks ScratchMonkey!)
# + Changed logfile location to /var/log/tss2 (Thanks ScratchMonkey!)
#
# Notes
# -----
# Sleep value of 10 seconds chosen because start-stop-daemon
# takes roughly 6-7 seconds to shut down every thread.
#
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/sbin/server_linux
NAME=tss2
DESC="TeamSpeak 2 Server"
TSS_INI="/etc/tss2/tsserver2.ini"
TSS_LOG="/var/log/tss2/tsserver2.log"
TSS_PID="/var/run/tss2/tsserver2.pid"
TSS_DB="/etc/tss2/server.db"
test -x $DAEMON || exit 0
set -e
case "$1" in
start)
echo -n "Starting $DESC: $NAME"
start-stop-daemon --start --chuid $NAME:$NAME --quiet --pidfile $TSS_PID \
--exec $DAEMON -- -DB=$TSS_DB -INI=$TSS_INI -LOG=$TSS_LOG -PID=$TSS_PID
echo "."
;;
stop)
echo -n "Stopping $DESC: $NAME "
start-stop-daemon --stop --quiet --pidfile $TSS_PID \
--exec $DAEMON
echo "."
;;
restart)
echo -n "Restarting $DESC: $NAME"
start-stop-daemon --stop --quiet --pidfile $TSS_PID \
--exec $DAEMON
sleep 10
start-stop-daemon --start --chuid $NAME:$NAME --quiet --pidfile $TSS_PID \
--exec $DAEMON -- -DB=$TSS_DB -INI=$TSS_INI -LOG=$TSS_LOG -PID=$TSS_PID
echo "."
;;
*)
N=/etc/init.d/$NAME
echo "Usage: $N {start|stop|restart)" >&2
exit 1
;;
esac
exit 0
Last edited by Echo; 01-09-2002 at 03:54.
|

28-08-2002, 05:24
|
|
-= TeamSpeak User =-
|
|
Join Date: Aug 2002
Location: Stanford, CA
Posts: 16
|
|
|
I forgot one thing. This is the line I used to create the tss2 user:
adduser --system --disabled-password --disabled-login --home /usr/share/doc/tss2 --no-create-home --group tss2
Hope this helps.
|

29-08-2002, 20:49
|
|
-= TeamSpeak User =-
|
|
Join Date: Aug 2002
Location: Stuttgart, Germany
Posts: 14
|
|
I just wanted to ask you, if you could "gpl" the init.d-script you offered in the posting above?
I just try to set up a Debian-Package (no official one!) and would like to use your script for it. I Promise i mention you within the docs-directory
|

31-08-2002, 01:19
|
|
-= TeamSpeak User =-
|
|
Join Date: Aug 2002
Location: Stanford, CA
Posts: 16
|
|
Sure, consider it GPL'd. Not sure if I'm supposed to do some fancy dance, or wave my arms around, or post some signature, but go ahead and use it, but yes, including mention for me would be nice  .
That being said, I'm not sure if you'll be able to package this in .deb format. Debian packages require the source code to be available under some kind of license (GPL, LGPL, Artistic License). I suppose it could fall under "non-free". Otherwise I would have packaged it myself  But good luck in your project.
|

31-08-2002, 23:44
|
|
-= TeamSpeak Addict =-
|
|
Join Date: Jun 2002
Location: Northern California
Posts: 350
|
|
|
Note that you could put the pid file in /var/run/tss2/tss2.pid. BIND uses this trick. That's what I did for my RPM.
|

01-09-2002, 03:55
|
|
-= TeamSpeak User =-
|
|
Join Date: Aug 2002
Location: Stanford, CA
Posts: 16
|
|
|
Thanks for the suggestion ScratchMonkey. I updated the script to mirror that (edited my original post).
|

02-09-2002, 02:40
|
|
-= TeamSpeak User =-
|
|
Join Date: Aug 2002
Location: Stuttgart, Germany
Posts: 14
|
|
Quote:
Originally posted by ScratchMonkey
Note that you could put the pid file in /var/run/tss2/tss2.pid. BIND uses this trick. That's what I did for my RPM.
|
If you could also let the Admins redirect the httpdocs-Directory, we would be able to install it as LFS wants programs to be installed. Until that, i'll create a .deb which installs it within /usr/local
Hope i've got enough time to package it until tomorrow
|

02-09-2002, 19:11
|
|
-= TeamSpeak User =-
|
|
Join Date: Aug 2002
Location: Stuttgart, Germany
Posts: 14
|
|
Finally finished
Finally, i just finished my .deb-Archive.
Now i wanted to ask the staff of teamspeak, if i may distribute it (for free and including your slicense.txt of course)?
If you want to see this package before, please let me know: roman dot kreisel at epost dot de
If you want to, we could also distribute if via your downloads-page, i think it would be much easier for debian users to install the programm.
|

02-09-2002, 20:50
|
|
-= TeamSpeak User =-
|
|
Join Date: Sep 2002
Location: California
Posts: 4
|
|
|
Re: Finally finished
Quote:
Originally posted by Sidious
Finally, i just finished my .deb-Archive.
|
Very well done, guys. I would be interested in this .deb since I'm a Debian user. Will this always ben an unofficial package or do you plan to register it with Debian? It would also be cool if they could provide a link to your .deb from the teamspeak.org web site.
- AK
|

02-09-2002, 23:18
|
|
-= TeamSpeak User =-
|
|
Join Date: Aug 2002
Location: Stuttgart, Germany
Posts: 14
|
|
|
Re: Re: Finally finished
Quote:
Originally posted by AKshun
Very well done, guys. I would be interested in this .deb since I'm a Debian user. Will this always ben an unofficial package or do you plan to register it with Debian? It would also be cool if they could provide a link to your .deb from the teamspeak.org web site.
- AK
|
I won't distribute my package until the authors gave me their O.K., cause I respect their work and really don't want them to be angry on me
As soon as they gave me their OK, i'll look for a nice place to host the file(s) and you'll get access to it.
|

07-09-2002, 23:21
|
|
-= TeamSpeak User =-
|
|
Join Date: Aug 2002
Location: Stuttgart, Germany
Posts: 14
|
|
|
Debian Packages are out!
Well now, the packages are created, The tss-team gave me their ok and now it's up to me to make it public
To install it, use ONE of the following steps:
a) Download http://elli-dietmar.kreisel.bei.t-on....17-1_i386.deb and install it using
dpkg -i tss_2.0.17-1_i386.deb
b) add the following line to your sources.list:
deb http://elli-dietmar.kreisel.bei.t-online.de/debian testing net
then execute:
apt-get update && apt-get install tss
Please report package-related bugs (and only those!) directly to me: roman dot kreisel at epost dot de
|

08-09-2002, 02:09
|
|
-= TeamSpeak User =-
|
|
Join Date: Aug 2002
Location: Stanford, CA
Posts: 16
|
|
|
Hmm, I want to download this, but then extract it and check out the scripts, not install it. Do you know the appropriate commands for that?
|

08-09-2002, 02:39
|
|
-= TeamSpeak User =-
|
|
Join Date: Aug 2002
Location: Stuttgart, Germany
Posts: 14
|
|
Quote:
Originally posted by Echo
Hmm, I want to download this, but then extract it and check out the scripts, not install it. Do you know the appropriate commands for that?
|
I'd read, that debian-archives are only ar-archives (not tar) which contains 2 .tar.gz-archives. So you only need to unar and untar it. But i prefer to have a look in the package using the midnight commander, he can handle the file format of the debian-archives
If both methods don't work, please give me feedback and i'll send you the scripts.
|

08-09-2002, 13:46
|
|
-= TeamSpeak User =-
|
|
Join Date: Aug 2002
Location: Stanford, CA
Posts: 16
|
|
|
Alright, I'm examining your scripts now, and will post my comments:
-In /etc/init.d/tss, a few things. First of all, I question your use of /usr/local/tss as the binary directory. I would recommend placing the binary in /usr/bin, which is more standard. This would also allow you to remove the "cd path/to/binary" line, as /usr/bin would be in the path. I also recommend changing "sleep 10" to "sleep $SLEEP_VALUE" so people can modify it at the top if they wish. May also wish to throw in a few comments documenting things that can be tweaked. Furthermore, I recommend changing ALL instances of "tss" to "tss2", as this is the "TeamSpeak Server 2" not "TeamSpeak Server" (server v1).
-After examining postinst, I understand why you chose /usr/local/tss. So that you could use that as the tss home directory as well. I recommend you place the home directory in the same directory as the documentation. For example, icecast-server (another Debian package), puts its home directory in /usr/share/icecast (Shared documentation location).
-In postinst, you can group similar looking 'chown' lines on the same line. For example:
chown -R tss:tss /usr/local/tss /etc/tss
This has the same effect
-I recommend removing the tss.SuSE and tss.minimal startscripts. They are redundant with the presence of the init.d script.
-md5sums is missing the sums for some files, namely those in etc/
-I am not familiar with this line in prerm:
# install-info --quiet --remove /usr/info/tss.info.gz
I see that you've commented it, but could you tell me what this does, and why it's commented? (I presume it's broken if uncommented?)
-So yeah, with all these changes, I recommend moving the slicense.txt and Readme.txt into the usr/share/doc/tss directory, and calling that the home directory. This will allow you to get rid of usr/local/tss, and place the binary in a more standard usr/bin.
Other than that, you've done a fantastic job! When these issues are addressed, I promise to test this out for you. Also, is it listed in the Debian archive yet? Have you filled an Intent To Package?
Last edited by Echo; 08-09-2002 at 13:50.
|

08-09-2002, 15:45
|
|
-= TeamSpeak User =-
|
|
Join Date: Aug 2002
Location: Stuttgart, Germany
Posts: 14
|
|
Quote:
|
-In /etc/init.d/tss, a few things. First of all, I question your use of /usr/local/tss as the binary directory. I would recommend placing the binary in /usr/bin, which is more standard. This would also allow you to remove the "cd path/to/binary" line, as /usr/bin would be in the path.
|
The Problem is NOT the binary itself but the "httpdocs"-directory. It seems, like the tss uses the current directory and searches the httpdocs-Directory only in there. Anyway i could've moved the binary itself into /usr/bin. But anyone who starts the binary from there directly wouldn't have a web-interface on this server! As long as i cannot specify where it should get the contents of httpdocs from using the ini-file or a parameter, i won't change it. It could cause too much trouble for people wondering why they cannot get a web-interface.
Quote:
|
I also recommend changing "sleep 10" to "sleep $SLEEP_VALUE" so people can modify it at the top if they wish. May also wish to throw in a few comments documenting things that can be tweaked.
|
Well, that's something i can change. But i'll wait a few days, maybe there are more things to do.
Quote:
|
Furthermore, I recommend changing ALL instances of "tss" to "tss2", as this is the "TeamSpeak Server 2" not "TeamSpeak Server" (server v1).
|
I thought about that, too. But i wanted to take one name everywhere (tss2 or tss) and a package called "tss2-2.0.17-1.deb" wouldn't be ok.
Quote:
-After examining postinst, I understand why you chose /usr/local/tss. So that you could use that as the tss home directory as well. I recommend you place the home directory in the same directory as the documentation. For example, icecast-server (another Debian package), puts its home directory in /usr/share/icecast (Shared documentation location).
|
The documentation is always placed in /usr/share/doc/packagename in Debian. The i could place the directory into /usr/share/tss, but i don't think there shouldn't be any binaries in /usr/share. So i hope the developers of tss give us the possibility to place the httpdocs-directory whereever we want it ;)
Quote:
-In postinst, you can group similar looking 'chown' lines on the same line. For example:
chown -R tss:tss /usr/local/tss /etc/tss
This has the same effect
|
Didn't knew that, i'll change it in my next release. Anyway, i think that's a minor bug ;)
Quote:
I recommend removing the tss.SuSE and tss.minimal startscripts. They are redundant with the presence of the init.d script.
|
I thought about that, too. But then i chose to leave it in there to hold the Package complete. Maybe we should start a vote 'bout it. Or just move the scripts to /usr/share/doc/tss?
Quote:
-md5sums is missing the sums for some files, namely those in etc/
|
That's easy to complain: The ini-file isn't created when installing the package, but when the server is started the first time (Not by my scripts but by the binary itself). Then every installation gets a uniqe password. If i would use a standard-ini-file with a standard-password, it would be a security-hole if someone forgets to adjust the admin-password
Quote:
-I am not familiar with this line in prerm:
# install-info --quiet --remove /usr/info/tss.info.gz
I see that you've commented it, but could you tell me what this does, and why it's commented? (I presume it's broken if uncommented?)
|
Don't know that either, it was created automatically by dpkg-buildpackage
Quote:
-So yeah, with all these changes, I recommend moving the slicense.txt and Readme.txt into the usr/share/doc/tss directory,
|
I promise to do that in the next release of my package
Quote:
and calling that the home directory. This will allow you to get rid of usr/local/tss, and place the binary in a more standard usr/bin.
|
1st: Where should i then place httpdocs? in /usr/share/docs? No! That's only the place where to put Documentation, not where to put the html-files for the webinterface!
2nd: Everyone who would start the binary directly from /usr/bin wouldn't have a webinterface (as i already mentioned above)
Quote:
Other than that, you've done a fantastic job! When these issues are addressed, I promise to test this out for you.
|
Thanks ;)
Quote:
Also, is it listed in the Debian archive yet? Have you filled an Intent To Package?
|
afaik it isn't easy to become a Debian-maintainer. Furthermore i don't think they're really interested in tss yet, cause
a) there isn't a windows client
b) on some machines it's far away from stable
c) It's not open-source. They HATE software which isn't open source ;)
Another thing i wanted to ask you: I just noticed, you're a native english-speaker. As you surely noticed, i'm not ;)
If there are any typos and/or unusual sentences within the Package, could you please report them, too?
Last edited by Sidious; 08-09-2002 at 18:46.
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| Thread Tools |
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT +1. The time now is 07:45.
Powered by vBulletin® Version 3.7.3 Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
|