Skip to content

Instantly share code, notes, and snippets.

@avivace
Last active January 19, 2016 10:17
Show Gist options
  • Save avivace/fe8f9f06bb78c3922c3c to your computer and use it in GitHub Desktop.
Save avivace/fe8f9f06bb78c3922c3c to your computer and use it in GitHub Desktop.
Denni Startup
#!/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
# avivace/2016
# Location of the 'su' command
su=/bin/su
# username of the teamspeak3 user
user=root
# tr3 path
dir="YOUR PATH"
# The start script
exec=./ts3server_startscript.sh
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment