From: dbs Date: Mon, 3 Mar 2008 13:34:25 +0000 (+0000) Subject: Bail with a reasonable error message if OPT_CONFIG does not exist X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=609519cac493b68cc0a5b2fdabb6036be859b826;p=working%2FOpenSRF.git Bail with a reasonable error message if OPT_CONFIG does not exist git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1251 9efc2488-bf62-4759-914b-345cdb29e865 --- diff --git a/bin/osrf_ctl.sh b/bin/osrf_ctl.sh index c440b0f..3fd6bfb 100755 --- a/bin/osrf_ctl.sh +++ b/bin/osrf_ctl.sh @@ -77,6 +77,10 @@ while getopts "a:d:clh" flag; do done [ -z "$OPT_CONFIG" ] && OPT_CONFIG="$BASEDIR/conf/opensrf_core.xml"; +if [ ! -r "$OPT_CONFIG" ]; then + echo "Please specify the location of the opensrf_core.xml file using the -c flag"; + exit 1; +fi; [ -z "$OPT_PID_DIR" ] && OPT_PID_DIR=/tmp; [ -z "$OPT_ACTION" ] && usage;