Forum

Results 1 to 4 of 4
  1. #1
    Join Date
    December 2009
    Location
    Netherlands
    Posts
    9

    Ubuntu start at boot with MySQL

    Edit by mod
    Please don't use this outdated script anymore! The script got an overhaul long time ago.
    Please use the minimal or startscript instead


    Hello,

    I can't get the teamspeak server to auto start at boot on ubuntu (with MySQL working). I tried placing the following lines in /etc/crontab:

    Code:
    @reboot root /usr/local/lib/teamspeak3/ts3server_linux_x86 inifile=ts3server.ini
    @reboot root /usr/local/lib/teamspeak3/ts3server_linux_x86 inifile=ts3server.ini dbpluginparameter=ts3db_mysql.ini
    @reboot root /usr/local/lib/teamspeak3/ts3server_linux_x86 inifile=/usr/local/lib/teamspeak3/ts3server.ini
    @reboot root /usr/local/lib/teamspeak3/ts3server_linux_x86 inifile=/usr/local/lib/teamspeak3/ts3server.ini dbpluginparameter=/usr/local/lib/teamspeak3/ts3db_mysql.ini
    @reboot teamspeak3-server
    /usr/local/bin/teamspeak3-server
    Code:
    #!/bin/sh
    cd /usr/local/lib/teamspeak3
    #./ts3server_linux_x86 inifile=ts3server.ini dbpluginparameter=ts3db_mysql.ini
    #./ts3server_linux_x86 inifile=ts3server.ini dbpluginparameter=ts3db_mysql.ini
    ./ts3server_linux_x86 inifile=./ts3server.ini dbpluginparameter=./ts3db_mysql.ini
    Some of them boot the teamspeak server up, but according to the logs the server is always using the default parameters for the mysql server (wich doesn't work).

    I tried using several start up scripts, but i can't get it to work with MySQL enabled. The server starts at boot, but it seems it can't find the ts3db_mysql.ini with my configuration. Therefore it's using the default parameters wich obviously don't work.

    contents of ts3server.ini
    Code:
    machine_id=
    default_voice_port=1337
    voice_ip=0.0.0.0
    licensepath=
    filetransfer_port=30033
    filetransfer_ip=0.0.0.0
    query_port=10011
    query_ip=0.0.0.0
    dbplugin=ts3db_mysql
    dbpluginparameter=ts3db_mysql.ini
    dbsqlpath=sql/
    dbsqlcreatepath=create_mysql/
    logpath=logs
    logquerycommands=0
    contents of ts3db_mysql.ini
    Code:
    [config]
    host=127.0.0.1
    port=3306
    username= :D
    password=^^
    database=:B
    socket=
    For anyone wondering: I have an extra blank line in my ts3db_mysql.ini..

    The strange thing is that it is working when i manually run the command "teamspeak3-server", but not when it is being executed at boot.

    Any suggestions on how to get the teamspeak server to start at boot with a mysql database on ubuntu?
    Last edited by dante696; February 21st, 2011 at 12:13 PM.

  2. #2
    Join Date
    December 2009
    Location
    Germany
    Posts
    4
    I'm using TS3 on Ubuntu 9.10. Startup at boot works fine.
    First create File /etc/init.d/ts3start, put the following into it:
    #!/bin/bash

    TSUSER="yourtsuser"
    TSPFAD="/yourts3dir/"

    su $TSUSER -c "cd $TSPFAD; ./ts3server_linux_amd64 inifile=ts3server.ini &"
    exit 0
    Make the File executeable
    Edit: You have to replace amd64 with x86

    now change dir to /etc/rc2.d
    Create a link to the Startscript:
    ln -s ../init.d/ts3start S65ts3start
    Thats it.

  3. #3
    Join Date
    December 2009
    Location
    Netherlands
    Posts
    9
    Thanks a lot! It's working .

  4. #4
    Join Date
    November 2010
    Location
    United States
    Posts
    11

    Wink

    Nice so far!
    Your`s doesn`t work on my system, but I modified it, works fine now:

    Create init file:
    Code:
    cat > /etc/init.d/ts3start
    Insert this and change the user and path:
    Code:
    #!/bin/bash
    
    TSUSER="tsuser"
    TSPFAD="/path to ts3 server/"
    
    
    su $TSUSER -c "cd $TSPFAD; ./ts3server_startscript.sh start inifile=ts3server.ini &"
    exit 0
    With Debian Lenny:
    Code:
    # ! /bin/sh
    ### BEGIN INIT INFO
    # Provides:          Teamspeak 3 Startscript
    # Required-Start:
    # Required-Stop:
    # Default-Start:
    # Default-Stop:
    # Short-Description: TeamSpeak 3 Startscript
    # Description:
    ### END INIT INFO
    
    TSUSER="tsuser"
    TSPFAD="/path to ts3 server/"
    
    
    su $TSUSER -c "cd $TSPFAD; ./ts3server_startscript.sh start inifile=ts3server.ini &"
    exit 0
    CONTROL D to save it!


    Make the File executeable:
    Code:
    chmod +x  /etc/init.d/ts3start
    Create a link to the Startscript:
    Code:
    cd /etc/rc2.d
    
    ln -s ../init.d/ts3start S65ts3start
    Thats it!

    Killerkeks
    Last edited by killerkeks; December 30th, 2010 at 02:31 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Teamspeak3 start on boot with MySQL
    By nireos in forum Linux / FreeBSD
    Replies: 1
    Last Post: February 21st, 2015, 04:29 PM
  2. make TS start on boot
    By g-lock_dk in forum Linux / FreeBSD
    Replies: 4
    Last Post: August 16th, 2013, 11:01 AM
  3. Replies: 2
    Last Post: July 18th, 2011, 07:44 PM
  4. Simple ts3 start up at boot
    By Rafter in forum Tools / Web Based
    Replies: 4
    Last Post: April 15th, 2010, 11:51 PM

Posting Permissions

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