Server startup script and where is my Server Description?

Rick Page mpcacrucesalus at gmail.com
Tue Dec 18 18:14:28 EST 2007


Here is the start up script(s) that I use to keep the server running. Feel
free to comment or modify as your heart desires.

Script: /etc/rc.d/init.d/games-user-user_ut3

#!/bin/bash
# Source function library.
. /etc/init.d/functions

export LD_LIBRARY_PATH=/usr/games/instances/user/user_ut3

RETVAL=0

start() {
    # Start daemons.
    su -c "/usr/games/instances/user/user_ut3/user_ut3-start.sh" - games
    sleep .2
    if [ -e /usr/games/instances/user/user_ut3/user_ut3.err ]
    then
        rm -f /usr/games/instances/user/user_ut3/user_ut3.err
        action $"Starting games-user-user_ut3: " /bin/false
    else
        action $"Starting games-user-user_ut3: " /bin/true
    fi
return $RETVAL
}

stop() {
    # Stop daemons.
    /bin/kill -9 `/bin/ps -eo pid,cmd | /bin/grep SCREEN | /bin/grep
"games-user-user_ut3 -t" | /bin/sed -re's/^[ ]*//g' | /bin/cut -d " " -f 1`
&
    RETVAL=$?
    if [ $RETVAL -eq 0 ];
    then
        action $"Shutting down games-user-user_ut3: " /bin/true
        su -c "/usr/bin/screen -wipe > /dev/null 2>&1" - games
    else
        action $"Shutting down games-user-user_ut3: " /bin/false
    fi
    rm -f /var/run/games/games-user-user_ut3.pid
    return $RETVAL
}

# See how we were called.
case "$1" in
start)
    start
    ;;
stop)
    stop
    ;;
restart)

# End of Script

Script /usr/games/instances/user/user_ut3/user_ut3-start.sh

#!/bin/bash

export LD_LIBRARY_PATH=/usr/games/instances/user/user_ut3

/usr/bin/screen -d -m -S games-user-user_ut3 -t games-user-user_ut3
/usr/games/instances/user/user_ut3/user_ut3.sh &

#End of Script

Script /usr/games/instances/user/user_ut3/user_ut3.sh

#!/bin/bash

# This infinite loop should keep servers restarting in the event of a crash.
# Only exit when the exit file exists.

# Source function library.
. /etc/init.d/functions

while true; do
    command_line=`./ut3 server
DM-ShangriLa?MaxPlayers=16?MinNetPlayers=0?NumPublicConnections=16?NumPrivateConnections=0?NumOpenPublicConnections=16?NumOpenPrivateConnections=0?bShouldAdvertise=True?bIsLanMatch=False?bUsesStats=True?bAllowJoinInProgress=True?bAllowInvites=True?bUsesPresence=True?bAllowJoinViaPresence=True?bUsesArbitration=False?bIsDedicated=True?bIsListPlay=False?OwningPlayerName=?PingInMs=0?AverageSkillRating=
0.000000
?GameMode=0?Difficulty=2?PureServer=1?LockedServer=0?Campaign=0?ForceRespawn=1?CustomMapName=DM-ShangriLa?CustomGameMode=
UTGame.UTDeathmatch
?GoalScore=20?TimeLimit=20?ServerDescription=077000080000067000032000085000084000051000032000083000101000114000118000101000114000?NumPlay=5?game=
UTGame.UTDeathmatch?name=XXXXX?alias=XXXXX
-log=DedicatedServer.log-Login=XXXXX -Password=XXXXX -multihome=
xxx.xxx.xxx.xxx -port=7877 -nohomedir`
    # Start the program.
    chmod 0774 /usr/games/instances/user/user_ut3/Binaries
    cd /usr/games/instances/user/user_ut3/Binaries && $command_line
done

#End of Script


I generated my Server Description by using this UT3 Server Description
Generator, http://www.penetrate.nl/UT3ServerDesc.php
But my Server Name comes up blank in the Server Browser.
Here is a link to my server from gametracker.com,
http://www.gametracker.com/server_info/64.34.161.48:7877/

I hope you find the startup scripts helpful and any solutions to the blank
Server Description would be great.

Rick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://icculus.org/pipermail/ut3/attachments/20071218/45e1edab/attachment.htm>


More information about the ut3 mailing list