2013-06-11 16:58:39 +00:00
|
|
|
[Unit]
|
2013-06-26 17:19:26 +00:00
|
|
|
Description=Apache ZooKeeper
|
|
|
|
After=network.target
|
|
|
|
ConditionPathExists=/etc/zookeeper/zoo.cfg
|
|
|
|
ConditionPathExists=/etc/zookeeper/log4j.properties
|
|
|
|
ConditionPathExists=/var/lib/zookeeper/data/myid
|
2013-06-11 16:58:39 +00:00
|
|
|
|
|
|
|
[Service]
|
|
|
|
Type=simple
|
|
|
|
User=zookeeper
|
|
|
|
SyslogIdentifier=zookeeper
|
2013-06-26 17:19:26 +00:00
|
|
|
WorkingDirectory=/var/lib/zookeeper
|
2014-06-05 01:16:35 +00:00
|
|
|
|
|
|
|
#UMask=0027
|
|
|
|
#Environment="CP=/etc/zookeeper:/usr/share/java/slf4j/slf4j-log4j12.jar:/usr/share/java/slf4j/slf4j-api.jar:/usr/share/java/netty.jar:/usr/share/java/log4j.jar:/usr/share/java/jline.jar:/usr/share/java/zookeeper/zookeeper.jar"
|
|
|
|
#Environment="IPv6=-Djava.net.preferIPv4Stack=false -Djava.net.preferIPv6Addresses=true"
|
2013-06-26 17:19:26 +00:00
|
|
|
#Environment="JMX=-Dcom.sun.management.jmxremote"
|
2014-06-05 01:16:35 +00:00
|
|
|
|
2013-06-26 17:19:26 +00:00
|
|
|
ExecStart=/usr/lib/jvm/jre-1.7.0/bin/java -cp $CP $JMX $IPv6 org.apache.zookeeper.server.quorum.QuorumPeerMain /etc/zookeeper/zoo.cfg
|
2013-06-11 16:58:39 +00:00
|
|
|
|
|
|
|
[Install]
|
2013-06-26 17:19:26 +00:00
|
|
|
WantedBy=multi-user.target
|