Towards zookeeper installation.
[lui-solr.git] / conf / zookeeper / zookeeper.init.conf
1 description "zookeeper centralized coordination service"
2
3 start on runlevel [2345]
4 stop on runlevel [!2345]
5
6 respawn
7
8 limit nofile 8192 8192
9
10 pre-start script
11     [ -r "/usr/share/java/zookeeper.jar" ] || exit 0
12     [ -r "/etc/zookeeper/conf/environment" ] || exit 0
13     . /etc/zookeeper/conf/environment
14     [ -d $ZOO_LOG_DIR ] || mkdir -p $ZOO_LOG_DIR
15     chown $USER:$GROUP $ZOO_LOG_DIR
16 end script
17
18 script
19     . /etc/zookeeper/conf/environment
20     [ -r /etc/default/zookeeper ] && . /etc/default/zookeeper
21     if [ -z "$JMXDISABLE" ]; then
22         JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.local.only=$JMXLOCALONLY"
23     fi
24     exec start-stop-daemon --start -c $USER --exec $JAVA --name zookeeper \
25         -- -cp $CLASSPATH $JAVA_OPTS -Dzookeeper.log.dir=${ZOO_LOG_DIR} \
26         -Dzookeeper.root.logger=${ZOO_LOG4J_PROP} $ZOOMAIN $ZOOCFG
27 end script