check for running jobs only

This commit is contained in:
Gunter Labes 2009-06-08 20:03:30 +00:00
parent b7a3d324a3
commit d8f56708b9

View file

@ -62,7 +62,7 @@ do
echo "started $SERVER server with command: 'wesnothd-$SERVER -c \"$SERVERBASE\"/wesnothd.cfg --port $PORT --threads $THREADS $PARAMETERS' (revision: $REV, pid: $PID) logging to: $LOG"
# wait a bit in case the process dies immediately
sleep 5
if jobs 1 > /dev/null
if jobs -l | grep Running
then # create some convenient links
ln -s "$SERVERBASE/logs/$LOG" "$LOG.$PID"
rm -f "$SERVERBASE"/old.log "$SERVERBASE"/old.pid