From: Bill Erickson Date: Fri, 16 Aug 2013 14:04:55 +0000 (-0400) Subject: LP1204123 more osrf_ctl/control script cleanup X-Git-Tag: osrf_rel_2_3_0-beta~28 X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=9f8d384361e88d786d70a350f6f154e93a592d7b;p=OpenSRF.git LP1204123 more osrf_ctl/control script cleanup Signed-off-by: Bill Erickson Signed-off-by: Jason Stephenson --- diff --git a/bin/opensrf-perl.pl.in b/bin/opensrf-perl.pl.in index e680f03..8f01200 100755 --- a/bin/opensrf-perl.pl.in +++ b/bin/opensrf-perl.pl.in @@ -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; diff --git a/bin/osrf_ctl.sh.in b/bin/osrf_ctl.sh.in index 527356d..0d28268 100755 --- a/bin/osrf_ctl.sh.in +++ b/bin/osrf_ctl.sh.in @@ -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 }