From 5df1b9e66e602c85bd53eb89c763f482beb5f11c Mon Sep 17 00:00:00 2001 From: erickson Date: Wed, 16 Feb 2005 17:39:34 +0000 Subject: [PATCH] added command line passing of bootstrap config file git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@74 9efc2488-bf62-4759-914b-345cdb29e865 --- bin/opensrf_ctl | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) 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 -- 2.11.0