From: Dennis Schafroth Date: Tue, 4 Mar 2014 16:36:18 +0000 (+0100) Subject: Fix start X-Git-Tag: v0.8~10 X-Git-Url: http://git.indexdata.com/?p=lui-solr.git;a=commitdiff_plain;h=68d8604b7cb44a5859f428ed3d1cd8ef8598dec6 Fix start --- diff --git a/etc/init.d/indexdata-solr-zookeeper b/etc/init.d/indexdata-solr-zookeeper index fc090c5..05187eb 100755 --- a/etc/init.d/indexdata-solr-zookeeper +++ b/etc/init.d/indexdata-solr-zookeeper @@ -22,10 +22,10 @@ # PATH=/usr/bin -DAEMON=/home/dennis/proj/lui-solr/etc/init.d/zookeeper.sh -SERVICES="/home/indexdata/solr-4.4.0/example/" +DAEMON=/usr/share/masterkey/lui/solr4/zookeeper/zookeeper.sh +SERVICES="" DESC="Index Data Services (SOLR Zookeeper)" -NAME=indexdata +NAME=indexdata-solr-zookeeper DEFAULT=/etc/default/indexdata-solr-zookeeper if [ -f "$DEFAULT" ] ; then . $DEFAULT @@ -36,24 +36,37 @@ fi set -e case "$1" in - start) - for srv in $SERVICES ; do - cd $SRV - $DAEMON start + start) + for SERVICE in $SERVICES ; do + if [ -d "$SERVICE" ] ; then + echo "starting $SERVICE" + cd $SERVICE + $DAEMON $1 + else + echo "No directory at $SERVICE" + fi done ;; - stop) - echo "Stopping $DESC." - for srv in $SERVICES ; do - cd $srv - $DAEMON stop + stop) + for SERVICE in $SERVICES ; do + if [ -d "$SERVICE" ] ; then + echo "Stopping $SERVICE" + cd $SERVICE + $DAEMON stop + else + echo "No directory at $SERVICE" + fi done ;; status) - echo "Checking status for $DESC." - for srv in $SERVICES ; do - cd $srv - $srv status + for SERVICE in $SERVICES ; do + if [ -d "$SERVICE" ] ; then + echo "checking $SERVICE" + cd $SERVICE + $DAEMON status + else + echo "No directory at $SERVICE" + fi done ;; #reload)