#! /bin/sh# TeamSpeak Server Auto-Start# Made by Olof 2007# Choose the folder and the user that should run it.USER=teamspeakDIR=/home/teamspeak/tss2_rc2# Start the Server on boot# su $USER -c "$DIR/server_linux -PID=tsserver2.pid"# Carry out specific functions when asked to by the systemcase "$1" in start) echo "Starting the TeamSpeak Server" su $USER -c "$DIR/server_linux -PID=tsserver2.pid" ;; stop) echo "Stopping the TeamSpeak Server" kill -KILL `cat $DIR/tsserver2.pid` ;; status) if [ -e $DIR/tsserver2.pid ]; then echo "The TeamSpeak Voice server is running." exit 0 else echo "The TeamSpeak Voice server is stopped." exit 3 fi ;; *) echo "Usage: /etc/init.d/tsserver {start|stop|status}" exit 1 ;;esacexit 0