Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- nano /etc/init.d/teamspeak3
- #!/bin/sh
- ### BEGIN INIT INFO
- # Provides: teamspeak3
- # Required-Start: $local_fs $network
- # Required-Stop: $local_fs $network
- # Default-Start: 2 3 4 5
- # Default-Stop: 0 1 6
- # Short-Description:
- # Description: Teamspeak 3 Server
- ### END INIT INFO
- ######################################
- # Customize values for your needs: "User"; "DIR"
- USER="teamspeak3"
- DIR="/home/teamspeak/"
- ###### Teamspeak 3 server start/stop script ######
- case "$1" in
- start)
- su $USER -c "${DIR}./AccountingServerEmulator"
- su $USER -c "${DIR}./ts3server_startscript.sh start"
- ;;
- stop)
- su $USER -c "${DIR}./ts3server_startscript.sh stop"
- su $USER -c "${DIR}./AccountingServerEmulator stop"
- ;;
- status)
- su $USER -c "${DIR}./ts3server_startscript.sh status"
- ;;
- *)
- echo "Usage: {start|stop|status}" >&2
- exit 1
- ;;
- esac
- exit 0
- chmod 755 /etc/init.d/teamspeak3
- update-rc.d teamspeak3 defaults
- /etc/init.d/teamspeak3 start
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement