Author: soliton
Date: Tue Apr 14 22:36:39 2009
New Revision: 34925

URL: http://svn.gna.org/viewcvs/wesnoth?rev=34925&view=rev
Log:
first rotate the pid file then write the new PID to it

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=34925&r1=34924&r2=34925&view=diff
==============================================================================
--- trunk/utils/mp-server/run_server (original)
+++ trunk/utils/mp-server/run_server Tue Apr 14 22:36:39 2009
@@ -73,13 +73,13 @@
        $COMMAND &> "$SERVERBASE/logs/$LOG" &
 
        PID=$!
-       echo $PID > $SERVERBASE/current.pid
        echo "started $SERVER server with command: '$COMMAND' (revision: $REV, 
pid: $PID) logging to: $LOG"
        # create some convenient links
        ln -s "$SERVERBASE/logs/$LOG" "$LOG.$PID"
        rm -f $SERVERBASE/old.{log,pid}
        mv $SERVERBASE/current.log $SERVERBASE/old.log &> /dev/null
        mv $SERVERBASE/current.pid $SERVERBASE/old.pid &> /dev/null
+       echo $PID > $SERVERBASE/current.pid
        ln -s "logs/$LOG" $SERVERBASE/current.log
        # wait for the server to terminate
        wait $PID


_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to