X-Git-Url: http://git.indexdata.com/?p=lui-solr.git;a=blobdiff_plain;f=etc%2Finit.d%2Findexdata-solr-zookeeper;h=05187ebd1de0fce8f3896b9997b931704cc77c59;hp=fc090c540443a13438866b2fd52b9c7e2d01e3b2;hb=68d8604b7cb44a5859f428ed3d1cd8ef8598dec6;hpb=6725455e1ba9320c608dbb50da5cc2a9eb3e188e 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)