Don't kill processes unless we're sure there's actually a process to kill
authorWouter Verhelst <w@uter.be>
Sun, 10 Jun 2012 20:15:11 +0000 (22:15 +0200)
committerWouter Verhelst <w@uter.be>
Sun, 10 Jun 2012 20:15:11 +0000 (22:15 +0200)
simple_test

index 88adb6d..b90798b 100755 (executable)
@@ -217,7 +217,10 @@ if [ -f ${pidfile} ]
 then
        kill `cat ${pidfile}`
 else
-       kill $PID
+       if [ ! -z "$PID" ]
+       then
+               kill $PID
+       fi
 fi
 if [ -z "$2" ]
 then