[arch-commits] Commit in elasticsearch/trunk (4 files)
Massimiliano Torromeo
mtorromeo at archlinux.org
Mon Oct 7 11:28:44 UTC 2019
Date: Monday, October 7, 2019 @ 11:28:44
Author: mtorromeo
Revision: 513724
updated service files
Modified:
elasticsearch/trunk/PKGBUILD
elasticsearch/trunk/elasticsearch-tmpfile.conf
elasticsearch/trunk/elasticsearch.service
elasticsearch/trunk/elasticsearch at .service
----------------------------+
PKGBUILD | 9 +++---
elasticsearch-tmpfile.conf | 2 -
elasticsearch.service | 54 ++++++++++++++++++++++++++++++----------
elasticsearch at .service | 57 +++++++++++++++++++++++++++++++------------
4 files changed, 88 insertions(+), 34 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2019-10-07 11:15:51 UTC (rev 513723)
+++ PKGBUILD 2019-10-07 11:28:44 UTC (rev 513724)
@@ -24,13 +24,13 @@
)
sha256sums=('d295bebef26b5ebebbdaa2c86abacd9498ab1b8a24de48f082edc350df56056f'
'ff530bf9440364955e9f38b5c5cc0782da1b1ac1c54870b162b7ded81e56eebc'
- 'de3842935b6ef9cb8a05dc18334112f534dccc2292e36052df942a92de7e66db'
- '13090c1d23ae0a21bf6f0f1d1da795d38972f1674b20c3d2d32f54311aa99094'
+ 'dd8b20f822ad8c66b9fc54faf2763ff10a24ca661f49d1799e1b86b5e2e785af'
+ 'ed24c03e7fa2339fe6077c68a48be66d36fe778435f050dd73d7990563b3e98e'
'bac40d87acaa5bee209ceb6dfa253009a072e9243fe3b94be42fb5cd44727d6f'
'22a78a165a810608188faea6f2b0b381f27b1e9d60126c3b3e729124540589a8'
'b3feb1e9c7e7ce6b33cea6c727728ed700332aae942ca475c3bcc1d56b9f113c'
'815f6a39db6f54bb40750c382ffbdc298d2c4c187ee8ea7e2f855923e2ff354b'
- '3173e3efa429507e6329f518699a072dfd442d9b5da7c62452a55f82334dd2b5'
+ '0a344d779c550de324bfda385896caf0d728563751c176127b63ebf2354abee0'
'bb74e5fb8bc28f2125e015395ab05bea117b72bfc6dadbca827694b362ee0bf8')
backup=('etc/elasticsearch/elasticsearch.yml'
@@ -51,7 +51,8 @@
package() {
cd "$pkgdir"
- install -dm750 etc/elasticsearch{,/scripts}
+ install -dm2750 etc/elasticsearch
+ install -dm750 etc/elasticsearch/scripts
install -dm755 {usr/share,var/lib,var/log}/elasticsearch
install -dm755 usr/bin
Modified: elasticsearch-tmpfile.conf
===================================================================
--- elasticsearch-tmpfile.conf 2019-10-07 11:15:51 UTC (rev 513723)
+++ elasticsearch-tmpfile.conf 2019-10-07 11:28:44 UTC (rev 513724)
@@ -2,5 +2,5 @@
d /var/lib/elasticsearch 0755 elasticsearch elasticsearch -
d /usr/share/elasticsearch/plugins 0755 elasticsearch elasticsearch -
-d /etc/elasticsearch 0750 - elasticsearch -
+d /etc/elasticsearch 2750 - elasticsearch -
d /etc/elasticsearch/scripts 0750 - elasticsearch -
Modified: elasticsearch.service
===================================================================
--- elasticsearch.service 2019-10-07 11:15:51 UTC (rev 513723)
+++ elasticsearch.service 2019-10-07 11:28:44 UTC (rev 513724)
@@ -2,38 +2,64 @@
Description=Elasticsearch
Documentation=http://www.elastic.co
Wants=elasticsearch-keystore.service
-Wants=network.target
+Wants=network-online.target
After=elasticsearch-keystore.service
-After=network.target
+After=network-online.target
[Service]
-Type=forking
+Type=notify
RuntimeDirectory=elasticsearch
-PIDFile=/run/elasticsearch/elasticsearch.pid
-
-Environment=JAVA_HOME=/usr/lib/jvm/default-runtime
-EnvironmentFile=-/etc/default/elasticsearch
+PrivateTmp=true
+Environment=ES_HOME=/usr/share/elasticsearch
Environment=ES_PATH_CONF=/etc/elasticsearch
-Environment=ES_TMPDIR=/tmp
+Environment=PID_DIR=/run/elasticsearch
+Environment=ES_SD_NOTIFY=true
+EnvironmentFile=-/etc/sysconfig/elasticsearch
-PrivateTmp=true
WorkingDirectory=/usr/share/elasticsearch
User=elasticsearch
Group=elasticsearch
-ExecStart=/usr/share/elasticsearch/bin/elasticsearch -d \
- -p /run/elasticsearch/elasticsearch.pid
+PermissionsStartOnly=true
+ExecStartPre=/usr/share/elasticsearch/bin/elasticsearch-keystore upgrade
-LimitNOFILE=65536
+ExecStart=/usr/share/elasticsearch/bin/elasticsearch -p ${PID_DIR}/elasticsearch.pid --quiet
+
+# StandardOutput is configured to redirect to journalctl since
+# some error messages may be logged in standard output before
+# elasticsearch logging system is initialized. Elasticsearch
+# stores its logs in /var/log/elasticsearch and does not use
+# journalctl by default. If you also want to enable journalctl
+# logging, you can simply remove the "quiet" option from ExecStart.
+StandardOutput=journal
+StandardError=inherit
+
+# Specifies the maximum file descriptor number that can be opened by this process
+LimitNOFILE=65535
+
+# Specifies the maximum number of processes
LimitNPROC=4096
+
+# Specifies the maximum size of virtual memory
LimitAS=infinity
+
+# Specifies the maximum file size
LimitFSIZE=infinity
-Restart=on-failure
+# Disable timeout logic and wait until process is stopped
+TimeoutStopSec=0
+
+# SIGTERM signal is used to stop the Java process
+KillSignal=SIGTERM
+
+# Send the signal only to the JVM rather than its control group
KillMode=process
+
+# Java process is never killed
SendSIGKILL=no
-TimeoutStopSec=0
+
+# When a JVM receives a SIGTERM signal it exits with code 143
SuccessExitStatus=143
[Install]
Modified: elasticsearch at .service
===================================================================
--- elasticsearch at .service 2019-10-07 11:15:51 UTC (rev 513723)
+++ elasticsearch at .service 2019-10-07 11:28:44 UTC (rev 513724)
@@ -1,39 +1,66 @@
[Unit]
-Description=Elasticsearch
+Description=Elasticsearch %I
Documentation=http://www.elastic.co
Wants=elasticsearch-keystore@%I.service
-Wants=network.target
+Wants=network-online.target
After=elasticsearch-keystore@%I.service
-After=network.target
+After=network-online.target
[Service]
-Type=forking
+Type=notify
RuntimeDirectory=elasticsearch
+PrivateTmp=true
+Environment=ES_HOME=/usr/share/elasticsearch
+Environment=ES_PATH_CONF=/etc/elasticsearch/%I
+Environment=PID_DIR=/run/elasticsearch
+Environment=ES_SD_NOTIFY=true
+EnvironmentFile=-/etc/sysconfig/elasticsearch
PIDFile=/run/elasticsearch/%I.pid
-Environment=JAVA_HOME=/usr/lib/jvm/default-runtime
-EnvironmentFile=-/etc/default/elasticsearch
-Environment=ES_PATH_CONF=/etc/elasticsearch/%I
-Environment=ES_TMPDIR=/tmp
-
-PrivateTmp=true
WorkingDirectory=/usr/share/elasticsearch
User=elasticsearch
Group=elasticsearch
-ExecStart=/usr/share/elasticsearch/bin/elasticsearch -d \
- -p /run/elasticsearch/%I.pid
+PermissionsStartOnly=true
+ExecStartPre=/usr/share/elasticsearch/bin/elasticsearch-keystore upgrade
-LimitNOFILE=65536
+ExecStart=/usr/share/elasticsearch/bin/elasticsearch -p ${PID_DIR}/%I.pid --quiet
+
+# StandardOutput is configured to redirect to journalctl since
+# some error messages may be logged in standard output before
+# elasticsearch logging system is initialized. Elasticsearch
+# stores its logs in /var/log/elasticsearch and does not use
+# journalctl by default. If you also want to enable journalctl
+# logging, you can simply remove the "quiet" option from ExecStart.
+StandardOutput=journal
+StandardError=inherit
+
+# Specifies the maximum file descriptor number that can be opened by this process
+LimitNOFILE=65535
+
+# Specifies the maximum number of processes
LimitNPROC=4096
+
+# Specifies the maximum size of virtual memory
LimitAS=infinity
+
+# Specifies the maximum file size
LimitFSIZE=infinity
-Restart=on-failure
+# Disable timeout logic and wait until process is stopped
+TimeoutStopSec=0
+
+# SIGTERM signal is used to stop the Java process
+KillSignal=SIGTERM
+
+# Send the signal only to the JVM rather than its control group
KillMode=process
+
+# Java process is never killed
SendSIGKILL=no
-TimeoutStopSec=0
+
+# When a JVM receives a SIGTERM signal it exits with code 143
SuccessExitStatus=143
[Install]
More information about the arch-commits
mailing list