LP1204123 more osrf_ctl/control script cleanup
authorBill Erickson <berick@esilibrary.com>
Fri, 16 Aug 2013 14:04:55 +0000 (10:04 -0400)
committerJason Stephenson <jstephenson@mvlc.org>
Wed, 4 Sep 2013 15:07:59 +0000 (11:07 -0400)
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>

bin/opensrf-perl.pl.in
bin/osrf_ctl.sh.in

index e680f03..8f01200 100755 (executable)
@@ -455,9 +455,11 @@ sub do_daemon {
     return 1 if $opt_no_daemon;
     my $service = shift;
     my $pid_file = get_pid_file($service);
-    #exit if OpenSRF::Utils::safe_fork();
-    return 0 if OpenSRF::Utils::safe_fork();
-    msg("starting service pid=$$ $service");
+    my $pid = OpenSRF::Utils::safe_fork();
+    if ($pid) { # parent
+        msg("starting service pid=$pid $service");
+        return 0;
+    }
     chdir('/');
     setsid();
     close STDIN;
index 527356d..0d28268 100755 (executable)
@@ -79,7 +79,7 @@ fi;
 
 
 start_all() {
-    opensrf-perl.pl --verbose --pid-dir $OPT_PID_DIR \
+    opensrf-perl.pl --pid-dir $OPT_PID_DIR \
         --config $OPT_CONFIG --start-all --settings-startup-pause 3
 }