[open-ils-commits] r17567 - branches/rel_2_0/Open-ILS/examples (erickson)

svn at svn.open-ils.org svn at svn.open-ils.org
Fri Sep 10 10:18:34 EDT 2010


Author: erickson
Date: 2010-09-10 10:18:32 -0400 (Fri, 10 Sep 2010)
New Revision: 17567

Modified:
   branches/rel_2_0/Open-ILS/examples/oils_ctl.sh
Log:
back-porting: 17566 => added command line option for defining a stderr output log file for the SIP server

Modified: branches/rel_2_0/Open-ILS/examples/oils_ctl.sh
===================================================================
--- branches/rel_2_0/Open-ILS/examples/oils_ctl.sh	2010-09-10 14:17:02 UTC (rev 17566)
+++ branches/rel_2_0/Open-ILS/examples/oils_ctl.sh	2010-09-10 14:18:32 UTC (rev 17567)
@@ -3,6 +3,7 @@
 OPT_ACTION=""
 OPT_SIP_CONFIG=""
 OPT_PID_DIR=""
+OPT_SIP_ERR_LOG="/dev/null";
 SIP_DIR="/opt/SIPServer";
 
 # ---------------------------------------------------------------------------
@@ -13,13 +14,12 @@
 
 function usage {
 	echo "";
-	echo "usage: $0 -d <pid_dir> -s <sip_config> -a <action>";
+	echo "usage: $0 -d <pid_dir> -s <sip_config> -a <action> -l <sip_err_log>";
 	echo "";
 	echo "Actions include:"
 	echo -e "\tstart_sip"
 	echo -e "\tstop_sip"
 	echo -e "\trestart_sip"
-	echo "";
 	exit;
 }
 
@@ -27,11 +27,12 @@
 # ---------------------------------------------------------------------------
 # Load the command line options and set the global vars
 # ---------------------------------------------------------------------------
-while getopts  "a:d:s:" flag; do
+while getopts "a:d:s:l:" flag; do
 	case $flag in	
 		"a")		OPT_ACTION="$OPTARG";;
 		"s")		OPT_SIP_CONFIG="$OPTARG";;
 		"d")		OPT_PID_DIR="$OPTARG";;
+		"l")		OPT_SIP_ERR_LOG="$OPTARG";;
 		"h"|*)	usage;;
 	esac;
 done
@@ -89,7 +90,7 @@
 	do_action "start" $PID_SIP "OILS SIP Server";
 	DIR=$(pwd);
 	cd $SIP_DIR;
-    perl SIPServer.pm "$OPT_SIP_CONFIG" > /dev/null 2>&1 &
+    perl SIPServer.pm "$OPT_SIP_CONFIG" >> "$OPT_SIP_ERR_LOG" 2>&1 &
 	pid=$!;
 	cd $DIR;
 	echo $pid > $PID_SIP;



More information about the open-ils-commits mailing list