From 92bf9dfe6f9faa52160dc67608f47306e702df44 Mon Sep 17 00:00:00 2001 From: dbs Date: Wed, 10 Oct 2007 21:51:18 +0000 Subject: [PATCH] Enable -l flag to work without an argument git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1105 9efc2488-bf62-4759-914b-345cdb29e865 --- bin/osrf_ctl.sh | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/bin/osrf_ctl.sh b/bin/osrf_ctl.sh index efc29f5..6d65902 100755 --- a/bin/osrf_ctl.sh +++ b/bin/osrf_ctl.sh @@ -12,9 +12,17 @@ OPT_PID_DIR="" function usage { echo ""; - echo "usage: $0 -d -c -a "; + echo "usage: $0 [OPTION]... -c -a "; echo ""; - echo "Actions include:" + echo "Mandatory parameters:"; + echo -e " -a\t\taction to perform"; + echo -e " -c\t\tfull path to C configuration file (opensrf_core.xml)"; + echo ""; + echo "Optional parameters:"; + echo -e " -d\t\tstore PID files in this directory"; + echo -e " -l\t\taccept 'localhost' as the fully-qualified domain name"; + echo ""; + echo "Actions include:"; echo -e "\tstart_router" echo -e "\tstop_router" echo -e "\trestart_router" @@ -31,9 +39,10 @@ function usage { echo -e "\tstart_all" echo -e "\trestart_all" echo ""; - echo "Example:"; - echo " $0 -c opensrf_core.xml -a restart_all"; - echo ""; + echo "Examples:"; + echo " $0 -c opensrf_core.xml -a restart_all"; + echo " $0 -l -c opensrf_core.xml -a restart_all"; + echo ""; exit; } @@ -41,7 +50,7 @@ function usage { # --------------------------------------------------------------------------- # Load the command line options and set the global vars # --------------------------------------------------------------------------- -while getopts "c:a:d:l:h" flag; do +while getopts "c:a:d:lh" flag; do case $flag in "a") OPT_ACTION="$OPTARG";; "c") OPT_CONFIG="$OPTARG";; -- 2.11.0