-
Notifications
You must be signed in to change notification settings - Fork 116
/
zookeeper.service.erb
27 lines (24 loc) · 1.4 KB
/
zookeeper.service.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Autogenerated by Puppet from zookeeper/templates/zookeeper.service.erb
# Do not edit
[Unit]
Description=Apache ZooKeeper
<%if ! [nil, :undefined, :undef].include?(scope.lookupvar("zookeeper::systemd_unit_want")) -%>
Wants=<%= scope.lookupvar("zookeeper::systemd_unit_want")%>
<% end -%>
<%if ! [nil, :undefined, :undef].include?(scope.lookupvar("zookeeper::systemd_unit_after")) -%>
After=<%= scope.lookupvar("zookeeper::systemd_unit_after") %>
<% end -%>
[Service]
ExecStart=/bin/bash -c 'set -x; \
. <%= scope.lookupvar("zookeeper::cfg_dir") %>/<%= scope.lookupvar("zookeeper::environment_file") %>; \
CLASSPATH="<%= @_zoo_dir %>/zookeeper<% if scope.lookupvar('zookeeper::install_method') == 'archive' -%>-<%= scope.lookupvar("zookeeper::archive_version") %><% end -%>.jar:<%= @_zoo_dir %>/lib/*:$CLASSPATH"; \
CLASSPATH="$([ -r <%= scope.lookupvar("zookeeper::service::_zoo_dir") %>/bin/zkEnv.sh ] && . <%= scope.lookupvar("zookeeper::service::_zoo_dir") %>/bin/zkEnv.sh ; echo $CLASSPATH)"; \
mkdir -p <%= scope.lookupvar("zookeeper::log_dir") %>; \
$JAVA "-Dzookeeper.log.dir=<%= scope.lookupvar("zookeeper::log_dir") %>" "-Dzookeeper.root.logger=$ZOO_LOG4J_PROP" -cp "$CLASSPATH" $JAVA_OPTS "$ZOOMAIN" "$ZOOCFG"'
Restart=always
RemainAfterExit=no
SyslogIdentifier=zookeeper
User=<%= scope.lookupvar("zookeeper::user") %>
Group=<%= scope.lookupvar("zookeeper::group") %>
[Install]
WantedBy=multi-user.target