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;
29 echo Running from `pwd`;
31 sipconfig=${1:-`pwd`/SIPconfig.xml};
32 outfile=${2:-$HOME/sip.out};
33 errfile=${3:-$HOME/sip.err};
35 echo "Calling (backgrounded):";
36 echo "perl -I./ ./SIPServer.pm $sipconfig >>$outfile 2>>$errfile";
37 perl -I./ ./SIPServer.pm $sipconfig >>$outfile 2>>$errfile &