Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
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;
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
}