Merge branch 'master' of ssh://git.indexdata.com/home/git/pub/lui-solr
authorDennis Schafroth <dennis@schafroth.com>
Fri, 29 Nov 2013 11:36:36 +0000 (12:36 +0100)
committerDennis Schafroth <dennis@schafroth.com>
Fri, 29 Nov 2013 11:36:36 +0000 (12:36 +0100)
scripts/zookeeper.sh
zookeeper/.#make_same_host_config.sh [deleted symlink]

index 8ff8bb4..8e48202 100755 (executable)
@@ -1,28 +1,27 @@
 #/bin/bash
 
-DIR=`dirname $0`
-PROG=`basename $0`
-
-cd $DIR
-OPTIONS="-Djetty.port=7500 -DzkHost=opencontent-solr.index:9983"
+OPTIONS="-Djetty.port=8983 -DzkHost=opencontent-solr.index:9983"
+NAME="indexdata-solr-zookeeper"
+PID_FILE=/var/run/${NAME}.pid
+LOG_FILE=/var/log/${NAME}.log
 if [ -f "options" ]; then 
     source options
 else
     echo "No options file. Using defaults: $OPTIONS"
 fi
 
-if [ "$1" = "start" ]; then 
-    if [ -f "${PROG}.pid" ] ; then 
-       echo "Pid file ${DIR}/${PROG}.pid exists. Already running?"
+if [ "$1" == "start" ]; then 
+    if [ -f "${PID_FILE}" ] ; then 
+       echo "pid file ${PID_FILE} exists. Already running?"
        exit 1
     fi
-    java $OPTIONS  -jar start.jar > solr.log & 
-    echo $$ > ${PROG}.pid
-elif [ "$1" = "stop" ]; then 
-    if [ -x "${PROG}.pid" ] ; then 
-       kill `echo ${PROG}.pid`
-       rm ${PROG}.pid
+    java $OPTIONS  -jar start.jar > $LOG_FILE & 
+    echo $! > ${PID_FILE}
+elif [ "$1" == "stop" ]; then 
+    if [ -x "${PID_FILE}" ] ; then 
+       kill `echo ${PID_FILE}`
+       rm ${PID_FILE}
     fi
 else
-       echo "$0 [start|stop]" 
+       echo "$0 [start|stop|status]" 
 fi
diff --git a/zookeeper/.#make_same_host_config.sh b/zookeeper/.#make_same_host_config.sh
deleted file mode 120000 (symlink)
index da3e3cb..0000000
+++ /dev/null
@@ -1 +0,0 @@
-dennis@opencontent-solr.index.567:1381402202
\ No newline at end of file