mail[Wesnoth-commits] r25239 - /trunk/utils/mp-server/run_server


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by soliton . de on March 28, 2008 - 15:38:
Author: soliton
Date: Fri Mar 28 15:32:21 2008
New Revision: 25239

URL: http://svn.gna.org/viewcvs/wesnoth?rev=25239&view=rev
Log:
* also make a symlink to the log(s) in the build dir

Modified:
    trunk/utils/mp-server/run_server

Modified: trunk/utils/mp-server/run_server
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/utils/mp-server/run_server?rev=25239&r1=25238&r2=25239&view=diff
==============================================================================
--- trunk/utils/mp-server/run_server (original)
+++ trunk/utils/mp-server/run_server Fri Mar 28 15:32:21 2008
@@ -38,23 +38,26 @@
                DATE=$(date +"%Y%m%d-%H%M%S")
                PORT=$(cat $SERVERBASE/port)
                REV=$(ls -l $SERVERBASE/build | sed -e 
's,.*wesnothd-\(svn-.*\)_.*/,\1,')
+               LOG=wesnothd.$DATE.$REV.log
                cd $SERVERBASE/build || exit 1
                if ! [ -x bin/wesnothd-$SERVER ]; then
                        echo "Executable 'bin/wesnothd-$SERVER' not found."
                        exit 1
                fi
-               nice -n 3 bin/wesnothd-$SERVER -c $SERVERBASE/wesnothd.cfg 
--port $PORT --threads $THREADS $PARAMETERS > 
$SERVERBASE/logs/wesnothd.$DATE.$REV.log 2>&1 &
+               nice -n 3 bin/wesnothd-$SERVER -c $SERVERBASE/wesnothd.cfg 
--port $PORT --threads $THREADS $PARAMETERS > $SERVERBASE/logs/$LOG 2>&1 &
                PID=$!
                echo -n "started $SERVER server (revision: $REV, pid: $PID) 
at: "; date
                cd $SERVERBASE
-               rm -f old.log oldlobby.log
+               rm -f old.log
                mv current.log old.log > /dev/null 2>&1
-               mv currentlobby.log oldlobby.log > /dev/null 2>&1
-               ln -s logs/wesnothd.$DATE.$REV.log current.log
-               ln -s logs/lobby.$DATE.$REV.log currentlobby.log
+               ln -s logs/$LOG current.log
+               ln -s logs/$LOG build/$LOG
                # wait a bit so the server is likely up and listening
                sleep 1
                if [ "$SERVER" == "1.2" ]; then
+                       rm -f oldlobby.log
+                       mv currentlobby.log oldlobby.log > /dev/null 2>&1
+                       ln -s logs/lobby.$DATE.$REV.log currentlobby.log
                        cd $SOURCE/utils/
                        ./mp-lobby-logger.pl -j -p $PORT -l 
$SERVERBASE/currentlobby.log >> $SERVERBASE/logs/lobby-chat.log 2>&1 &
                        cd $SERVERBASE/build




Related Messages


Powered by MHonArc, Updated Fri Mar 28 16:22:07 2008