summarylogtreecommitdiffstats
path: root/elasticsearch@.service
diff options
context:
space:
mode:
Diffstat (limited to 'elasticsearch@.service')
-rw-r--r--elasticsearch@.service40
1 files changed, 40 insertions, 0 deletions
diff --git a/elasticsearch@.service b/elasticsearch@.service
new file mode 100644
index 000000000000..006ce33b1fb1
--- /dev/null
+++ b/elasticsearch@.service
@@ -0,0 +1,40 @@
+[Unit]
+Description=Elasticsearch
+Documentation=http://www.elastic.co
+Wants=elasticsearch-keystore@%I.service
+Wants=network.target
+After=elasticsearch-keystore@%I.service
+After=network.target
+
+[Service]
+Type=forking
+RuntimeDirectory=elasticsearch6
+PIDFile=/run/elasticsearch6/%I.pid
+
+Environment=JAVA_HOME=/usr/lib/jvm/default-runtime
+EnvironmentFile=-/etc/default/elasticsearch6
+Environment=ES_PATH_CONF=/etc/elasticsearch6/%I
+Environment=ES_TMPDIR=/tmp
+
+PrivateTmp=true
+WorkingDirectory=/usr/share/elasticsearch6
+
+User=elasticsearch
+Group=elasticsearch
+
+ExecStart=/usr/share/elasticsearch6/bin/elasticsearch -d \
+ -p /run/elasticsearch6/%I.pid
+
+LimitNOFILE=65536
+LimitNPROC=4096
+LimitAS=infinity
+LimitFSIZE=infinity
+
+Restart=on-failure
+KillMode=process
+SendSIGKILL=no
+TimeoutStopSec=0
+SuccessExitStatus=143
+
+[Install]
+WantedBy=multi-user.target