Author: soliton
Date: Sat Apr  4 01:29:01 2009
New Revision: 34446

URL: http://svn.gna.org/viewcvs/wesnoth?rev=34446&view=rev
Log:
save the PID to a file for easy access elsewhere

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=34446&r1=34445&r2=34446&view=diff
==============================================================================
--- trunk/utils/mp-server/run_server (original)
+++ trunk/utils/mp-server/run_server Sat Apr  4 01:29:01 2009
@@ -73,11 +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
+       rm -f $SERVERBASE/old.{log,pid}
        mv $SERVERBASE/current.log $SERVERBASE/old.log &> /dev/null
+       mv $SERVERBASE/current.pid $SERVERBASE/old.pid &> /dev/null
        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