aboutsummaryrefslogtreecommitdiff
path: root/audio/teamspeak_server/files
diff options
context:
space:
mode:
Diffstat (limited to 'audio/teamspeak_server/files')
-rw-r--r--audio/teamspeak_server/files/teamspeak_server.sh27
1 files changed, 15 insertions, 12 deletions
diff --git a/audio/teamspeak_server/files/teamspeak_server.sh b/audio/teamspeak_server/files/teamspeak_server.sh
index 3f9ffdde1213..cfff238856a7 100644
--- a/audio/teamspeak_server/files/teamspeak_server.sh
+++ b/audio/teamspeak_server/files/teamspeak_server.sh
@@ -9,18 +9,21 @@ PIDFILE=${TSHOME}/server.pid
cd "$TSHOME"
case "$1" in
- start)
- ./server_linux >/dev/null 2>&1
- ;;
- stop)
- kill -TERM `cat "$PIDFILE"`
- ;;
- restart)
- $0 stop && $0 start || exit 1
- ;;
- *)
- echo "Usage: $0 {start|stop|restart}"
- exit 1
+ start)
+ su -fm nobody -c './server_linux >/dev/null 2>&1' && echo -n ' teamspeak_server'
+ ;;
+ stop)
+ kill -TERM `cat "$PIDFILE"`
+ ;;
+ restart)
+ $0 stop
+ echo 5 second pause before restart. . .
+ sleep 5
+ $0 start
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|restart}"
+ exit 1
esac
exit 0