I'm trying to run TeamSpeak3 server on boot. I have ts3server script put in /etc/init.d. It works if I type ts3server start but it doesn't work on boot. What's more it shuts down on reboot so only starting does work. To set it I've used:
update-rc.d setdatetime defaults
Did I do something wrong? Here is the code of script:
### BEGIN INIT INFO
# Provides: teamspeak
# Required-Start: $local_fs $network
# Required-Stop: $local_fs $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Description: Teamspeak 3 Server
### END INIT INFO
USER="ts3"
DIR="/home/ts3/teamspeak3-server_linux-amd64"
###### 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"
;;
status)
su $USER -c "$DIR/ts3server_startscript.sh status"
;;
*)
echo "Usage: " >&2
exit 1
;;
esac
exit 0
Try adding
to the end of that file.
You might want to put it in a screen:
If I were you I would leave the startup script exactly where it is. As I have done on my server. I only added the following line to my /etc/init.d/