From: erickson Date: Wed, 16 Feb 2005 17:39:34 +0000 (+0000) Subject: added command line passing of bootstrap config file X-Git-Tag: osrf_rel_2_0_1~1798 X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=5df1b9e66e602c85bd53eb89c763f482beb5f11c;p=OpenSRF.git added command line passing of bootstrap config file git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@74 9efc2488-bf62-4759-914b-345cdb29e865 --- diff --git a/bin/opensrf_ctl b/bin/opensrf_ctl index ffc3499..00739dd 100755 --- a/bin/opensrf_ctl +++ b/bin/opensrf_ctl @@ -5,10 +5,18 @@ # Only works on linux because of 'ps' syntax # +usage() { + echo "usage: system.sh [start|stop|restart|status] "; +} + case $1 in "start") - perl -MOpenSRF::System -e 'OpenSRF::System->bootstrap()' & + if [ -z $2 ]; then + usage; + exit; + fi + perl -MOpenSRF::System="$2" -e 'OpenSRF::System->bootstrap()' & sleep 2; $0 status; echo; @@ -33,11 +41,15 @@ case $1 in exit 1; ;; "restart") + if [ -z $2 ]; then + usage; + exit; + fi $0 stop; - $0 start; + $0 start $2; ;; *) - echo "usage: system.sh [start|stop|restart|status]"; + usage; ;; esac