3 # A sample script for starting SIP.
4 # You probably want to specify new log destinations.
6 # Takes 3 optional arguments:
7 # ~ SIPconfig.xml file to use
8 # ~ file for STDOUT, default ~/sip.out
9 # ~ file for STDERR, default ~/sip.err
11 # The STDOUT and STDERR files are only for the SIPServer process itself.
12 # Actual SIP communication and transaction logs are handled by Syslog.
15 # sip_run.sh /path/to/SIPconfig.xml
16 # sip_run.sh ~/my_sip/SIPconfig.xml sip_out.log sip_err.log
19 for x
in HOME PERL5LIB KOHA_CONF
; do
21 if [ -z ${!x} ] ; then
22 echo ERROR
: $x not defined
;
27 # you should hard code this if you have multiple directories
29 PERL_MODULE_DIR
=$PERL5LIB
30 cd $PERL_MODULE_DIR/C
4/SIP
;
34 outfile
=${2:-$HOME/sip.out};
35 errfile
=${3:-$HOME/sip.err};
37 if [ $sipconfig ]; then
38 echo "Running with config file located in $sipconfig" ;
39 echo "Calling (backgrounded):";
40 echo "perl ./SIPServer.pm $sipconfig >>$outfile 2>>$errfile";
41 perl .
/SIPServer.pm
$sipconfig >>$outfile 2>>$errfile &
44 echo "Please specify a config file and try again."