don't try to 'kill' an empty pid / prevents warnings
authorerickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Wed, 3 Jun 2009 13:26:30 +0000 (13:26 +0000)
committererickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Wed, 3 Jun 2009 13:26:30 +0000 (13:26 +0000)
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1711 9efc2488-bf62-4759-914b-345cdb29e865

bin/osrf_ctl.sh.in

index 9b14865..74a20f2 100755 (executable)
@@ -120,8 +120,10 @@ function do_action {
                fi;
 
         while read pid; do
                fi;
 
         while read pid; do
-            echo "Stopping $item process $pid..."
-            kill -s INT $pid
+            if [ -n "$pid" ]; then
+                echo "Stopping $item process $pid..."
+                kill -s INT $pid
+            fi;
         done < $pidfile;
                rm -f $pidfile;
 
         done < $pidfile;
                rm -f $pidfile;