made the pid file reading smarter. removed the nasty killalls since they are no...
authorerickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Fri, 7 Mar 2008 22:33:48 +0000 (22:33 +0000)
committererickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Fri, 7 Mar 2008 22:33:48 +0000 (22:33 +0000)
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1264 9efc2488-bf62-4759-914b-345cdb29e865

bin/osrf_ctl.sh

index c96f5b8..4793c95 100755 (executable)
@@ -115,11 +115,10 @@ function do_action {
                        return 0;
                fi;
 
                        return 0;
                fi;
 
-               pid=$(cat $pidfile);
-               echo "Stopping $item : $pid";
-               kill -s INT $pid 2> /dev/null;
-        sleep 1;
-               kill -9 $pid 2> /dev/null;
+        while read pid; do
+            echo "Stopping process $pid..."
+            kill -s INT $pid
+        done < $pidfile;
                rm -f $pidfile;
 
        fi;
                rm -f $pidfile;
 
        fi;
@@ -176,7 +175,6 @@ function start_c {
 
 function stop_c {
        do_action "stop" $PID_OSRF_C "OpenSRF C";
 
 function stop_c {
        do_action "stop" $PID_OSRF_C "OpenSRF C";
-       killall -9 opensrf-c  # hack for now to force kill all C services
        sleep 1;
        return 0;
 }
        sleep 1;
        return 0;
 }