From: miker Date: Thu, 5 Jul 2007 00:02:42 +0000 (+0000) Subject: capture the perl pid using ps instead of $! (forking for daemonization) X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=aaedf2c05e145215354c1d45ca033cfe536016d8;p=working%2FOpenSRF.git capture the perl pid using ps instead of $! (forking for daemonization) git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@994 9efc2488-bf62-4759-914b-345cdb29e865 --- diff --git a/bin/osrf_ctl.sh b/bin/osrf_ctl.sh index 374385d..c96eb4c 100755 --- a/bin/osrf_ctl.sh +++ b/bin/osrf_ctl.sh @@ -119,9 +119,9 @@ function stop_router { function start_perl { do_action "start" $PID_OSRF_PERL "OpenSRF Perl"; perl -MOpenSRF::System="$OPT_CONFIG" -e 'OpenSRF::System->bootstrap()' & - pid=$!; + pid=$(ps ax | grep "OpenSRF System" | grep -v grep | grep -v "System-C"| awk '{print $1}') echo $pid > $PID_OSRF_PERL; - sleep 5; + sleep 3; return 0; }