]> git.donarmstrong.com Git - dsa-puppet.git/blobdiff - 3rdparty/modules/elasticsearch/templates/etc/init.d/elasticsearch.systemd.erb
upgrade to elasticsearch/elasticsearch 0.9.6
[dsa-puppet.git] / 3rdparty / modules / elasticsearch / templates / etc / init.d / elasticsearch.systemd.erb
index 5bdb6ba4c827318f3f77ccd926687413fc206aae..2f5321df9f3a7e128784d2d9162617b4b77dc0b7 100644 (file)
@@ -4,15 +4,19 @@ Documentation=http://www.elasticsearch.org
 
 [Service]
 Type=forking
-EnvironmentFile=/etc/sysconfig/elasticsearch-<%= @name %>
+EnvironmentFile=<%= @defaults_location %>/elasticsearch-<%= @name %>
 User=<%= @user %>
 Group=<%= @group %>
-PIDFile=/var/run/elasticsearch/elasticsearch-<%= @name %>.pid
-ExecStart=/usr/share/elasticsearch/bin/elasticsearch -d -p /var/run/elasticsearch/elasticsearch-<%= @name %>.pid -Des.default.config=$CONF_FILE -Des.default.path.home=$ES_HOME -Des.default.path.logs=$LOG_DIR -Des.default.path.data=$DATA_DIR -Des.default.path.work=$WORK_DIR -Des.default.path.conf=$CONF_DIR
+PIDFile=<%= @pid_dir %>/elasticsearch-<%= @name %>.pid
+ExecStart=/usr/share/elasticsearch/bin/elasticsearch -d -p <%= @pid_dir %>/elasticsearch-<%= @name %>.pid -Des.default.config=$CONF_FILE -Des.default.path.home=$ES_HOME -Des.default.path.logs=$LOG_DIR -Des.default.path.data=$DATA_DIR -Des.default.path.work=$WORK_DIR -Des.default.path.conf=$CONF_DIR
 # See MAX_OPEN_FILES in sysconfig
-LimitNOFILE=65535
+LimitNOFILE=<%= @nofile %>
 # See MAX_LOCKED_MEMORY in sysconfig, use "infinity" when MAX_LOCKED_MEMORY=unlimited and using bootstrap.mlockall: true
-#LimitMEMLOCK=infinity
+<% if @memlock == 'unlimited' %>
+LimitMEMLOCK=infinity
+<% else %>
+LimitMEMLOCK=<%= @memlock %>
+<% end %>
 # Shutdown delay in seconds, before process is tried to be killed with KILL (if configured)
 TimeoutStopSec=20