Bail with a reasonable error message if OPT_CONFIG does not exist
authordbs <dbs@9efc2488-bf62-4759-914b-345cdb29e865>
Mon, 3 Mar 2008 13:34:25 +0000 (13:34 +0000)
committerdbs <dbs@9efc2488-bf62-4759-914b-345cdb29e865>
Mon, 3 Mar 2008 13:34:25 +0000 (13:34 +0000)
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1251 9efc2488-bf62-4759-914b-345cdb29e865

bin/osrf_ctl.sh

index c440b0f..3fd6bfb 100755 (executable)
@@ -77,6 +77,10 @@ while getopts  "a:d:clh" flag; do
 done
 
 [ -z "$OPT_CONFIG" ] && OPT_CONFIG="$BASEDIR/conf/opensrf_core.xml";
 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;
 
 [ -z "$OPT_PID_DIR" ] && OPT_PID_DIR=/tmp;
 [ -z "$OPT_ACTION" ] && usage;