[zookeeper] 01/08: Move settings irrelevant to systemd from environment file to init script

Tony Mancill tmancill at moszumanska.debian.org
Fri Jul 8 04:21:05 UTC 2016


This is an automated email from the git hooks/post-receive script.

tmancill pushed a commit to branch master
in repository zookeeper.

commit 8c69d33b3a1b47243d87a10348c2c58bf333d34e
Author: Felix Dreissig <f30 at f30.me>
Date:   Thu Jul 7 09:31:18 2016 +0200

    Move settings irrelevant to systemd from environment file to init script
    
    systemd environment files do not support variable substitutions, so
    settings like `ZOOCFGDIR` have to be copied.
---
 debian/conf_example/environment | 27 +++++++++------------------
 debian/zookeeperd.init          | 10 ++++++++--
 debian/zookeeperd.upstart       |  2 +-
 3 files changed, 18 insertions(+), 21 deletions(-)

diff --git a/debian/conf_example/environment b/debian/conf_example/environment
index be495fd..cbd8404 100644
--- a/debian/conf_example/environment
+++ b/debian/conf_example/environment
@@ -1,20 +1,11 @@
-NAME=zookeeper
-ZOOCFGDIR=/etc/$NAME/conf
-
-# TODO this is really ugly
-# How to find out, which jars are needed?
-# seems, that log4j requires the log4j.properties file to be in the classpath
-CLASSPATH="$ZOOCFGDIR:/usr/share/java/jline.jar:/usr/share/java/log4j-1.2.jar:/usr/share/java/xercesImpl.jar:/usr/share/java/xmlParserAPIs.jar:/usr/share/java/netty.jar:/usr/share/java/slf4j-api.jar:/usr/share/java/slf4j-log4j12.jar:/usr/share/java/zookeeper.jar"
-
-ZOOCFG="$ZOOCFGDIR/zoo.cfg"
-ZOO_LOG_DIR=/var/log/$NAME
-USER=$NAME
-GROUP=$NAME
-PIDDIR=/var/run/$NAME
-PIDFILE=$PIDDIR/$NAME.pid
-SCRIPTNAME=/etc/init.d/$NAME
-JAVA=/usr/bin/java
-ZOOMAIN="org.apache.zookeeper.server.quorum.QuorumPeerMain"
-ZOO_LOG4J_PROP="INFO,ROLLINGFILE"
+ZOOMAIN=org.apache.zookeeper.server.quorum.QuorumPeerMain
+ZOOCFG=/etc/zookeeper/conf/zoo.cfg
+ZOO_LOG_DIR=/var/log/zookeeper
+ZOO_LOG4J_PROP=INFO,ROLLINGFILE
 JMXLOCALONLY=false
 JAVA_OPTS=""
+
+# TODO: This is really ugly
+# How to find out which jars are needed?
+# Seems that log4j requires the log4j.properties file to be in the classpath
+CLASSPATH="/etc/zookeeper/conf:/usr/share/java/jline.jar:/usr/share/java/log4j-1.2.jar:/usr/share/java/xercesImpl.jar:/usr/share/java/xmlParserAPIs.jar:/usr/share/java/netty.jar:/usr/share/java/slf4j-api.jar:/usr/share/java/slf4j-log4j12.jar:/usr/share/java/zookeeper.jar"
diff --git a/debian/zookeeperd.init b/debian/zookeeperd.init
index 444789a..e76ff27 100644
--- a/debian/zookeeperd.init
+++ b/debian/zookeeperd.init
@@ -27,8 +27,14 @@
 
 # PATH should only include /usr/* if it runs after the mountnfs.sh script
 PATH=/sbin:/usr/sbin:/bin:/usr/bin
-DESC="centralized coordination service"
-SCRIPTNAME=/etc/init.d/$NAME
+DESC="Coordination service for distributed applications"
+NAME=zookeeper
+USER=$NAME
+GROUP=$NAME
+JAVA=/usr/bin/java
+PIDDIR="/var/run/$NAME"
+PIDFILE="$PIDDIR/$NAME.pid"
+SCRIPTNAME="/etc/init.d/$NAME"
 
 # Read configuration variable file if it is present
 [ -r /etc/default/$NAME ] && . /etc/default/$NAME
diff --git a/debian/zookeeperd.upstart b/debian/zookeeperd.upstart
index 167ae02..7c7b729 100644
--- a/debian/zookeeperd.upstart
+++ b/debian/zookeeperd.upstart
@@ -1,4 +1,4 @@
-description "zookeeper centralized coordination service"
+description "ZooKeeper coordination service for distributed applications"
 
 start on runlevel [2345]
 stop on runlevel [!2345]

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/zookeeper.git



More information about the pkg-java-commits mailing list