From 68d8604b7cb44a5859f428ed3d1cd8ef8598dec6 Mon Sep 17 00:00:00 2001 From: Dennis Schafroth Date: Tue, 4 Mar 2014 17:36:18 +0100 Subject: [PATCH] Fix start --- etc/init.d/indexdata-solr-zookeeper | 45 ++++++++++++++++++++++------------- 1 file changed, 29 insertions(+), 16 deletions(-) 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) -- 1.7.10.4