2013-05-11 05:06:56 +02:00
|
|
|
#!/sbin/runscript
|
|
|
|
# Copyright 1999-2013 Gentoo Foundation
|
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
2013-09-06 17:11:54 +02:00
|
|
|
# $Header: /var/cvsroot/gentoo-x86/media-sound/teamspeak-server-bin/files/teamspeak-server-bin-3.0.7.2.rc,v 1.1 2013/05/22 11:22:59 tomwij Exp $
|
2013-05-11 05:06:56 +02:00
|
|
|
|
|
|
|
depend() {
|
|
|
|
need net
|
|
|
|
use mysql
|
|
|
|
}
|
|
|
|
|
|
|
|
start() {
|
|
|
|
ebegin "Starting TeamSpeak 3 Server"
|
|
|
|
|
|
|
|
# ensure, that the TS3-server finds all custom supplied shared objects on startup.
|
|
|
|
LD_LIBRARY_PATH="/opt/teamspeak3-server:$LD_LIBRARY_PATH"
|
|
|
|
export LD_LIBRARY_PATH
|
|
|
|
|
2013-09-06 17:11:54 +02:00
|
|
|
# temporay fix for EPERM bug (we still leave it here to make sure it is *really* not there)
|
|
|
|
rm -f /dev/shm/7gbhujb54g8z9hu43jre8
|
|
|
|
|
|
|
|
[ -d /var/run/teamspeak3-server ] || mkdir /var/run/teamspeak3-server
|
|
|
|
chown teamspeak3:teamspeak3 /var/run/teamspeak3-server
|
|
|
|
|
2013-05-11 05:06:56 +02:00
|
|
|
start-stop-daemon --start --quiet --background \
|
|
|
|
--pidfile "/var/run/teamspeak3-server/server.pid" --make-pidfile \
|
|
|
|
--user "teamspeak3" --chdir "/opt/teamspeak3-server" \
|
|
|
|
--exec "/usr/sbin/ts3server" -- \
|
|
|
|
inifile="/etc/teamspeak3-server/server.conf"
|
|
|
|
|
|
|
|
eend $?
|
|
|
|
}
|
|
|
|
|
|
|
|
stop() {
|
2013-09-06 17:11:54 +02:00
|
|
|
ebegin "Stopping TeamSpeak Server"
|
2013-05-11 05:06:56 +02:00
|
|
|
|
|
|
|
start-stop-daemon --stop --quiet \
|
|
|
|
--pidfile "/var/run/teamspeak3-server/server.pid"
|
|
|
|
|
|
|
|
eend $?
|
|
|
|
}
|
|
|
|
|
|
|
|
restart() {
|
|
|
|
svc_stop
|
|
|
|
sleep 3
|
|
|
|
svc_start
|
|
|
|
}
|