don't try to 'kill' an empty pid / prevents warnings
[OpenSRF.git] / bin / osrf_ctl.sh.in
index 9b14865..74a20f2 100755 (executable)
@@ -120,8 +120,10 @@ function do_action {
                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;