[svn r852] server/data/gmsd script fixed trunk
authormelunko
Tue Sep 18 13:45:04 2007 +0100 (2007-09-18)
branchtrunk
changeset 8465d027884a9d3
parent 845 659a8a79ec31
child 847 3c18c36245e7
[svn r852] server/data/gmsd script fixed
gmyth-stream/server/data/gmsd
     1.1 --- a/gmyth-stream/server/data/gmsd	Mon Sep 17 18:50:42 2007 +0100
     1.2 +++ b/gmyth-stream/server/data/gmsd	Tue Sep 18 13:45:04 2007 +0100
     1.3 @@ -24,11 +24,11 @@
     1.4              echo "$PROGRAM_NAME already running."
     1.5          else
     1.6              rm -f $PIDFILE
     1.7 -            $PROGRAM_BIN -d > $LOGFILE
     1.8 +            $PROGRAM_BIN -d > $LOGFILE 2> $LOGFILE
     1.9              echo "OK"
    1.10          fi
    1.11      else
    1.12 -        $PROGRAM_BIN -d > $LOGFILE
    1.13 +        $PROGRAM_BIN -d > $LOGFILE 2> $LOGFILE
    1.14          echo "OK"
    1.15      fi
    1.16      ;;
    1.17 @@ -38,11 +38,12 @@
    1.18      if [ -f $PIDFILE ]
    1.19      then
    1.20          PID=`cat $PIDFILE`
    1.21 -        if ps ax | grep -q "^$PID"
    1.22 +        if  ps -p "$PID" > /dev/null 
    1.23          then
    1.24 -            kill -10 $PID
    1.25 +            kill -9 $PID
    1.26          fi
    1.27          rm $PIDFILE
    1.28 +        echo "OK"
    1.29      else
    1.30          echo "No $PROGRAM_NAME found running; no killed."
    1.31      fi