[zookeeper] 04/08: Add systemd unit file for zookeeperd

Tony Mancill tmancill at moszumanska.debian.org
Fri Jul 8 04:21:06 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 73f3f4c44abf5555dd631ac97ee8acf938fc051a
Author: Felix Dreissig <f30 at f30.me>
Date:   Thu Jul 7 10:57:46 2016 +0200

    Add systemd unit file for zookeeperd
---
 debian/control            |  1 +
 debian/rules              |  2 +-
 debian/zookeeperd.service | 18 ++++++++++++++++++
 3 files changed, 20 insertions(+), 1 deletion(-)

diff --git a/debian/control b/debian/control
index 7488951..2df6d0e 100644
--- a/debian/control
+++ b/debian/control
@@ -11,6 +11,7 @@ Build-Depends:
  debhelper (>= 9~),
  default-jdk (>= 2:1.6),
  default-jdk-doc,
+ dh-systemd,
  help2man,
  ivy-debian-helper,
  javacc,
diff --git a/debian/rules b/debian/rules
index d69ce5e..b6a0f0a 100755
--- a/debian/rules
+++ b/debian/rules
@@ -16,7 +16,7 @@ ANT_ARGS = -Dversion=$(DEB_UPSTREAM_VERSION) \
            -Dant.build.javac.target=1.5
 
 %:
-	dh $@ --buildsystem=ivy --with javahelper --with python2
+	dh $@ --buildsystem=ivy --with javahelper --with python2 --with systemd
 
 override_dh_auto_build:
 	# TODO exclude the fatjar contrib from upstream tarball and include the rest contrib
diff --git a/debian/zookeeperd.service b/debian/zookeeperd.service
new file mode 100644
index 0000000..6137014
--- /dev/null
+++ b/debian/zookeeperd.service
@@ -0,0 +1,18 @@
+[Unit]
+Description=Coordination service for distributed applications
+After=network.target
+ConditionPathExists=/var/lib/zookeeper/myid
+
+[Service]
+Type=simple
+User=zookeeper
+SyslogIdentifier=zookeeper
+EnvironmentFile=/etc/zookeeper/conf/environment
+EnvironmentFile=-/etc/default/zookeeper
+ExecStart=/usr/bin/java -cp ${CLASSPATH} $JAVA_OPTS -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.local.only=${JMXLOCALONLY} -Dzookeeper.log.dir=${ZOO_LOG_DIR} -Dzookeeper.root.logger=${ZOO_LOG4J_PROP} $ZOOMAIN $ZOOCFG
+SuccessExitStatus=143
+# ZooKeeper is "fail-fast", see https://zookeeper.apache.org/doc/r3.4.8/zookeeperAdmin.html#sc_supervision
+Restart=always
+
+[Install]
+WantedBy=multi-user.target

-- 
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