Chucky's Playhouse :: Forums :: Linux :: Linux
 
<< Previous thread | Next thread >>
TS Start Script works on Suse 10
Moderators: admin, chucky
Author Post
chucky
Sat Jan 20 2007, 11:48PM

Registered Member #2
Joined: Sat Dec 09 2006, 04:02PM
Location: Laval
Posts: 10
Just a small post for myself so i do not loose this !!

#! /bin/sh
# Author: Alex D.
# Please send feedback to e-mail
#
# /etc/init.d/tss
# and its symbolic link
# /(usr/)sbin/rctss
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

### BEGIN INIT INFO
# Provides: tss
# Required-Start: $syslog $remote_fs
# Default-Start: 3 5
# Default-Stop: 0 1 2 6
# Short-Description: TeamSpeak server
# Description: Starts and provides a TeamSpeak2 server
### END INIT INFO


### CONFIGURATION: PLEASE CHANGE ACCORDING TO YOUR INSTALLATION! ###

TSS_BIN=/srv/ts/tss2_rc2/server_linux
TSS_PID=/srv/ts/tss2_rc2/tsserver2.pid
# Warning! For security reasons please don't start the TeamSpeak server as root!
TSS_USER=ts

### END OF CONFIGURATION ####

TSS_NAME="TeamSpeak server"
test -x $TSS_BIN || { echo "$TSS_BIN not installed";
if [ "$1" = "stop" ]; then exit 0;
else exit 5; fi; }

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


# Read config
# . $FOO_CONFIG
. /etc/rc.status

case "$1" in
start)
echo -n "Starting $TSS_NAME "
## Start daemon with startproc(8). If this fails
## the return value is set appropriately by startproc.
/sbin/startproc -f -p $TSS_PID -u $TSS_USER $TSS_BIN

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

/sbin/killproc -TERM $TSS_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
;;
status)
echo -n "Checking for service $TSS_NAME "
/sbin/checkproc $TSS_BIN
rc_status -v
;;
*)
echo "Usage: $0 {start|stop|restart|status}"
exit 1
;;
esac
rc_exit
Back to top
Website
Fuen
Wed Aug 08 2007, 12:54PM
Registered Member #7
Joined: Wed Aug 08 2007, 12:46PM
Location: Coteau du Lac
Posts: 5
Wow, does that script start TS server by only clicking on icon in desktop?

If so then good jog!

Cya
Back to top
chucky
Wed Aug 08 2007, 06:24PM

Registered Member #2
Joined: Sat Dec 09 2006, 04:02PM
Location: Laval
Posts: 10
No it is a TS boot script which starts TS at boot time !
Many servers are best start at boot. They will work even if x crashes on boot..

 I like ot set up Voice Coms Server with Team Speak which will start at boot.
 Also an apache server that can take charge of teamspeak with mysql or Run scripts that you can iframe into another page.
 And also the no-ip.com updater scrpt with a 2 min renewal.

 I find these 3 items together work best for a flawless Voice Coms experience !
Back to top
Website
 

Jump:     Back to top

Syndicate this thread: rss 0.92 Syndicate this thread: rss 2.0 Syndicate this thread: RDF
Powered by e107 Forum System
Render time: 0.2163 sec, 0.0618 of that for queries. DB queries: 27.