TeamSpeak start up Ubuntu 14.04.1 LTS

This problem stumpt me for a while. I run a TeamSpeak damon on my VPS linux box. The issue with this application, is they do not create startup script in the /etc/init.d folder.

There are many TeamSpeak startup scripts but the following seems to work best for me.

#!/bin/sh
 
case "$1" in
start)
/etc/teamspeak3/ts3server_startscript.sh start
;;
stop)
/etc/teamspeak3/ts3server_startscript.sh stop
;;
status)
/etc/teamspeak3/ts3server_startscript.sh status
;;
*)
  echo "Usage: `basename $0` {start|stop|status}" >&2
  exit 1
  ;;
esac
exit 0

Now that the bash script has been created in the /ete/init.d directory we can now use “service teamspeak3 start” to start the damon but every time the server restarts we have to run this manually. We need to add Teamspeak to the system start up. The following command will add this.

update-rc.d teamspeak3 defaults

That is it. Next time your server reboots Teamspeak will start.

2 thoughts on “TeamSpeak start up Ubuntu 14.04.1 LTS”

  1. This script works great, however, it will start the teamspeak process as ROOT which is not a good idea.

  2. #!/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: Teamspeak 3 Server
    ### END INIT INFO

    USER=”teamspeak”
    DIR=”/usr/local/bin/teamspeak3-server_linux-amd64″

    ###### Teamspeak 3 server start/stop script ######

    case “$1” in
    start)
    su -c “${DIR}/ts3server_startscript.sh start” -s /bin/bash $USER
    ;;
    stop)
    su -c “${DIR}/ts3server_startscript.sh stop” -s /bin/bash $USER
    ;;
    restart)
    su -c “${DIR}/ts3server_startscript.sh restart” -s /bin/bash $USER
    ;;
    status)
    su -c “${DIR}/ts3server_startscript.sh status” -s /bin/bash $USER
    ;;
    *)
    echo “Usage: {start|stop|restart|status}” >&2
    exit 1
    ;;
    esac
    exit 0

    ————————————————————————————
    Works for me on:
    Ubuntu 14.04.3 LTS (GNU/Linux 3.13.0-51-generic x86_64)

Comments are closed.