Skip to content

Instantly share code, notes, and snippets.

@Regenhardt
Created June 16, 2019 08:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Regenhardt/760da407b226f9760c638197af662305 to your computer and use it in GitHub Desktop.
Save Regenhardt/760da407b226f9760c638197af662305 to your computer and use it in GitHub Desktop.
#!/bin/sh
### BEGIN INIT INFO
# Provides: ts3
# Required-Start: $local_fs $network
# Required-Stop: $local_fs $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: TS3-Server
# Description: Teamspeak 3 Server
### END INIT INFO
# INIT Script by www.SysADMINsLife.com
######################################
# Customize values for your needs: "User"; "DIR"
USER="teamspeak"
DIR="/home/teamspeak/Server"
###### Teamspeak 3 server start/stop script ######
case "$1" in
start)
su $USER -c "${DIR}/ts3server_startscript.sh start"
;;
stop)
su $USER -c "${DIR}/ts3server_startscript.sh stop"
;;
restart)
su $USER -c "${DIR}/ts3server_startscript.sh restart"
;;
force-reload)
su $USER -c "${DIR}/ts3server_startscript.sh restart"
;;
status)
su $USER -c "${DIR}/ts3server_startscript.sh status"
;;
*)
echo "Usage: {start|stop|restart|force-reload|status}"
exit 0
;;
esac
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment