Ubuntu Pastebin

Paste from Skyrider at Thu, 29 Oct 2015 14:40:56 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/bash
#
# teamspeak3 Start/Stop/Restart Teamspeak service
#
# chkconfig: 2345 98 8
# description: Start/Stop/Restart the Teamspeak voice server
# install: chkconfig --add teamspeak3
# uninstall: chkconfig --del teamspeak3
# author: Tig (wowsin.org)

# Location of the 'su' command
su=/bin/su
# Username of the teamspeak3 user
user=teamspeak3
# or relative (meaning if your directory is in the home directory of ts and is called ts3
# then you just need ts3, as is the default.
dir=/usr/local/teamspeak3
# The start script (I use the current default
exec=./ts3server_startscript.sh

# See how we were called.
case "$1" in
start)
$su - $user -c "cd $dir;$exec start"
;;
stop)
$su - $user -c "cd $dir;$exec stop"
;;
restart)
$su - $user -c "cd $dir;$exec restart"
;;
status)
$su - $user -c "cd $dir;$exec status"
;;
*)
echo $"Usage: $0 {start|stop|restart|status}"
exit 2
esac
exit 0
Download as text