Forum


Notice to all users

We are migrating towards a new forum system located at community.teamspeak.com, as such this forum will become read-only on January 29, 2020

Results 1 to 4 of 4
  1. #1
    Join Date
    March 2017
    Posts
    1

    looking for autostart @ reboot, [email protected] Script

    Hey Guys,

    i'm actually looking for a script, that shutdown the server correctly @ root-reboot, startup after root-reboot and reboot after the server crashed.

    So for shutdown and startup i have found this script:

    Code:
    #!/bin/sh
    ### BEGIN INIT INFO
    # Provides: ts3server
    # Required-Start: $local_fs $remote_fs $network $syslog $named
    # Required-Stop: $local_fs $remote_fs $network $syslog $named
    # Default-Start: 2 3 4 5
    # Default-Stop: 0 1 6
    # X-Interactive: true
    # Short-Description: TeamSpeak 3 server
    # Description: Start the TeamSpeak 3 server and associated services
    # This script will start TeamSpeak 3 server, and possibly all associated services.
    ### END INIT INFO
    DESC="voice server"
    NAME=ts3server
    USER="teamspeak"
    SCRIPTNAME="${0##*/}"
    SCRIPTNAME="${SCRIPTNAME##[KS][0-9][0-9]}"
    ENV="env -i LANG=C PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
    case "$1" in
     start)
     echo "Starting $DESC" "$NAME"
     echo
     su - $USER -c "./ts3server_startscript.sh start"
     ;;
     stop)
     echo "Stopping $DESC" "$NAME"
     echo
     su - $USER -c "./ts3server_startscript.sh stop"
     ;;
     status)
     su - $USER -c "./ts3server_startscript.sh status"
     exit $?
     ;;
     restart)
     echo "Restarting $DESC" "$NAME"
     echo
     su - $USER -c "./ts3server_startscript.sh stop"
     su - $USER -c "./ts3server_startscript.sh start"
     ;;
     *)
     echo "Usage: $SCRIPTNAME {start|stop|status|restart}" >&2
     exit 3
     ;;
    esac
    exit 0
    But its dont restart the server after a crash. Anyone here and can help me?

  2. #2
    Join Date
    December 2004
    Location
    RF
    Posts
    3,008
    Which init daemon you're using?

  3. #3
    Join Date
    February 2012
    Location
    Germany
    Posts
    577
    In case you are running systemd as init system and not some sysv init scripts, use a systemd unit as given here instead of a startup script: http://forum.teamspeak.com/threads/1...769#post421769
    Used this way, systemd will monitor the Teamspeak daemon and restart accordingly.

  4. #4
    Join Date
    September 2017
    Posts
    1

    how to use the provided startscript properly? [ubuntu]

    Hi there,

    as always i downloaded and started the teamspeak server as local user on my root server.
    I also used the provided startscript:

    su teamspeak
    cd /home/teamspeak/teamspeak3-server_linux_amd64
    ./ts3server_startscript.sh start


    fine but after reboot (kenel update) i have to start again


    i wonder how to implent the startscript into my /etc/init.d structure (ubuntu)?
    because if i just copy or symlink the script it will run as root, plus i have to specify the binary path some where so it cannot be the right way...
    there are several solutions in the web but i guess there is a proper way to use the provided startscript?

    Greetings Yasuo
    Last edited by dante696; September 22nd, 2017 at 09:04 AM. Reason: merged

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Autostart script on reboot
    By NightWalk3r in forum Linux / FreeBSD
    Replies: 8
    Last Post: February 11th, 2016, 11:09 PM
  2. Replies: 6
    Last Post: June 26th, 2012, 08:56 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •