PDA

View Full Version : SuSE startup script


ErwinK
07-08-2002, 02:35
Hi all,

Great program.

I've got two modifications for your SuSE linux startup script:

1. this is a minor typo:
echo Stopping TeamSpeak Sercer Daemon

should be:
echo Stopping TeamSpeak Server Daemon

2. a timer problem:
When using the restart option of the SuSE startup script it will fail to start the server. This is because of an 2 sec wait in the program. So if you add a line like this in the stop phase:

AFTER:

kill -TERM `cat /var/run/tss.pid`

ADD
sleep 3

So tss can fully stop and afterwards tss can start automatically.

I hope you can use this info.

ErwinK
07-08-2002, 02:42
#! /bin/bash
# Copyright (c) 2001 TeamSpeak team All rights reserved.
#
# Author: Niels Werensteijn 2001
#
# /etc/init.d/tss
#
### BEGIN INIT INFO
# Provides: tss
# Required-Start: $network
# Required-Stop:
# Default-Start: 3 5
# Default-Stop:
# Description: TeamSpeakServer
### END INIT INFO

. /etc/rc.status

rc_reset

case "$1" in
start)
echo Starting TeamSpeak Server Daemon
/usr/bin/tss -INI=/etc/tsserver.ini -LOG=/var/log/tss.log -
PID=/var/run/tss.pid > /dev/null
rc_status -v
;;
stop)
echo Stopping TeamSpeak Server Daemon
kill -TERM `cat /var/run/tss.pid`
sleep 3
rc_status -v
;;
restart)
$0 stop && $0 start || return=$rc_failed
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
exit 0