From 866bb561dc4dc92b587be177a7c8261b58439a3d Mon Sep 17 00:00:00 2001 From: Liz Rea Date: Sat, 31 Dec 2011 21:41:03 -0600 Subject: [PATCH] Bug 7238 Followup - fix sip_run to require path to SIPconfig.xml This requires Chris C's patch to move the scripts to the new location outside of C4. To test: run sip_run.sh with no arguments - it should fail with a message to add the path and try again. Run sip_run.sh with a path to a valid SIPconfig.xml - it should start and run. --- C4/SIP/sip_run.sh | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/C4/SIP/sip_run.sh b/C4/SIP/sip_run.sh index 587e323438..b1bc8d9c43 100755 --- a/C4/SIP/sip_run.sh +++ b/C4/SIP/sip_run.sh @@ -26,12 +26,17 @@ done; unset x; cd $PERL5LIB/C4/SIP; echo; -echo Running from `pwd`; -sipconfig=${1:-`pwd`/SIPconfig.xml}; +sipconfig=${1}; outfile=${2:-$HOME/sip.out}; errfile=${3:-$HOME/sip.err}; -echo "Calling (backgrounded):"; -echo "perl -I./ ./SIPServer.pm $sipconfig >>$outfile 2>>$errfile"; -perl -I./ ./SIPServer.pm $sipconfig >>$outfile 2>>$errfile & +if [ $sipconfig ]; then + echo "Running with config file located in $sipconfig" ; + echo "Calling (backgrounded):"; + echo "perl -I./ ./SIPServer.pm $sipconfig >>$outfile 2>>$errfile"; + perl -I./ ./SIPServer.pm $sipconfig >>$outfile 2>>$errfile & + +else + echo "Please specify a config file and try again." +fi -- 2.39.5