From cc2d1c883b77926ef7a3bd69913dffc37b42fb30 Mon Sep 17 00:00:00 2001 From: erickson Date: Fri, 10 Sep 2010 14:17:02 +0000 Subject: [PATCH] added command line option for defining a stderr output log file for the SIP server git-svn-id: svn://svn.open-ils.org/ILS/trunk@17566 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/examples/oils_ctl.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Open-ILS/examples/oils_ctl.sh b/Open-ILS/examples/oils_ctl.sh index 106caf265..c88dc671b 100755 --- a/Open-ILS/examples/oils_ctl.sh +++ b/Open-ILS/examples/oils_ctl.sh @@ -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 @@ SIP_DIR="/opt/SIPServer"; function usage { echo ""; - echo "usage: $0 -d -s -a "; + echo "usage: $0 -d -s -a -l "; echo ""; echo "Actions include:" echo -e "\tstart_sip" echo -e "\tstop_sip" echo -e "\trestart_sip" - echo ""; exit; } @@ -27,11 +27,12 @@ function usage { # --------------------------------------------------------------------------- # 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 @@ function start_sip { 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; -- 2.11.0