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 2 of 2
  1. #1
    Join Date
    January 2010
    Location
    Germany
    Posts
    88

    Startscript help needed

    Hey Guys,
    is it possible to add a "gm msg=***BLA***" before the Server restarts with this startscript?

    Code:
    ***blablabla***
    
    case "$1" in
        start)
            if [ -e $TS3_DIR/$TS3_PIDFILE ];  then
                echo "TeamSpeak 3 PID file already exists. Is the server still running?"
                exit 0
            fi
            echo "Starting TeamSpeak 3 Server."
            cd $TS3_DIR
            ./ts3server_linux_x86 inifile=ts3server.ini &
       sleep 5s
       cd $TS3_DIR/ts3phpbot/
       ./ts3phpbot.php stop
       ./ts3phpbot.php start
        ;;
        stop)
            echo "Stopping TeamSpeak 3 Server."
            kill -KILL `pidof -x ts3server_linux_x86`
            rm $TS3_DIR/$TS3_PIDFILE
        ;;
        restart)
            $0 stop && $0 start || exit 1
        ;;
        status)
            if [ -e $TS3_DIR/$TS3_PIDFILE ]; then
                echo "The TeamSpeak 3 server seems to be running."
            else
                echo "The TeamSpeak 3 server seems to be stopped."
            fi
        ;;
        *)
            echo "usage: $0 (start|stop|restart|status)"
        ;;
    esac
    
    exit 0

  2. #2
    Join Date
    August 2008
    Location
    Whois
    Posts
    586
    I make this: Create a file calls "message.sh"

    Code:
    #!/usr/bin/expect -f
    #Teamspeak3 MultiStartscript SendMessage
    
    # Version: 1.1
    #
    # Written by:
    # J. Daniel (/dev/null/ Ôka Pikniker )
    # http://www.goxts.com
    #
    # Support Site: http://forum.teamspeak.com/showthread.php?t=48418
    #
    
    # CHANGE THIS CONFIG FOR YOU OWN SERVERCONFIG
    
    # ~~ Change the password! ~~
    set LOGIN "XXXXX"
    
    # ~~ Change the Virtual Server ID ~~
    set VSERVERID "1"
    
    
    # ~~ END OF CONFIGURATION ~~
    
    
    ########################################
    #                                           #
    #  ! DO NOT EDIT THE FOLLOWING LINES ! #
    #                                           #
    ########################################
    set USER "login serveradmin "
    set HOST "127.0.0.1"
    set USE "use "
    set timeout 1
    global TELNET
    spawn telnet $HOST 10011
    set telnet $spawn_id
    expect "Username:"
    send $USER$LOGIN\r
    expect "Server:"
    send $USE$VSERVERID\r
    send "sendtextmessage targetmode=3 target=1 msg=Serverneustart_Serverupdate_in_1_Minute!\r"
    expect "Quit:"
    send quit\r
    interact
    Now start the script with

    Code:
    ./message.sh
    sleep 60

Thread Information

Users Browsing this Thread

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

Posting Permissions

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