Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-misc/elasticsearch/files/
Date: Sat, 22 Sep 2018 07:07:35
Message-Id: 1537600033.7073891c434fa15c7219d2212e38ee5387b971aa.mgorny@gentoo
1 commit: 7073891c434fa15c7219d2212e38ee5387b971aa
2 Author: Michael Mair-Keimberger <m.mairkeimberger <AT> gmail <DOT> com>
3 AuthorDate: Wed Sep 19 17:30:34 2018 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Sat Sep 22 07:07:13 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7073891c
7
8 app-misc/elasticsearch: remove unused files
9
10 Signed-off-by: Michael Mair-Keimberger <m.mairkeimberger <AT> gmail.com>
11 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
12 Closes: https://github.com/gentoo/gentoo/pull/9916
13
14 app-misc/elasticsearch/files/elasticsearch.init.3 | 62 --------------------
15 app-misc/elasticsearch/files/elasticsearch.init.4 | 67 ----------------------
16 .../elasticsearch/files/elasticsearch.service.2 | 51 ----------------
17 3 files changed, 180 deletions(-)
18
19 diff --git a/app-misc/elasticsearch/files/elasticsearch.init.3 b/app-misc/elasticsearch/files/elasticsearch.init.3
20 deleted file mode 100644
21 index cd89acd9f99..00000000000
22 --- a/app-misc/elasticsearch/files/elasticsearch.init.3
23 +++ /dev/null
24 @@ -1,62 +0,0 @@
25 -#!/sbin/openrc-run
26 -
27 -name="Elasticsearch"
28 -description="Elasticsearch Server"
29 -
30 -ES_INSTANCE=${SVCNAME#*.}
31 -
32 -if [ -n "${ES_INSTANCE}" ] && [ ${SVCNAME} != "elasticsearch" ]; then
33 - ES_BASE_PATH="/var/lib/elasticsearch/${ES_INSTANCE}"
34 - CONF_DIR="/etc/elasticsearch/${ES_INSTANCE}"
35 - DEFAULT_LOG_DIR="/var/log/elasticsearch/${ES_INSTANCE}"
36 -else
37 - ES_BASE_PATH="/var/lib/elasticsearch/_default"
38 - CONF_DIR="/etc/elasticsearch"
39 - DEFAULT_LOG_DIR="/var/log/elasticsearch/_default"
40 -fi
41 -
42 -ES_HOME=${ES_HOME:="/usr/share/elasticsearch"}
43 -ES_USER=${ES_USER:="elasticsearch"}
44 -ES_GROUP=${ES_GROUP:="elasticsearch"}
45 -ES_STARTUP_SLEEP_TIME=${ES_STARTUP_TIME:=5}
46 -MAX_OPEN_FILES=${MAX_OPEN_FILES:=65536}
47 -MAX_MAP_COUNT=${MAX_MAP_COUNT:=262144}
48 -
49 -DATA_DIR=${DATA_DIR:="${ES_BASE_PATH}/data"}
50 -LOG_DIR=${LOG_DIR:="${DEFAULT_LOG_DIR}"}
51 -
52 -if [ -f "${CONF_DIR}/elasticsearch.in.sh" ]; then
53 - ES_INCLUDE="${CONF_DIR}/elasticsearch.in.sh"
54 -fi
55 -
56 -export ES_INCLUDE
57 -export JAVA_HOME
58 -export JAVA_OPTS
59 -export ES_JVM_OPTIONS
60 -export ES_JAVA_OPTS
61 -export ES_STARTUP_SLEEP_TIME
62 -export ES_PATH_CONF="${CONF_DIR}"
63 -
64 -pidfile="/run/elasticsearch/${RC_SVCNAME}.pid"
65 -
66 -command="/usr/share/elasticsearch/bin/elasticsearch"
67 -command_args="--daemonize --pidfile=${pidfile} -Epath.logs=${LOG_DIR} -Epath.data=${DATA_DIR}"
68 -command_user="${ES_USER}:${ES_GROUP}"
69 -required_files="${CONF_DIR}/elasticsearch.yml"
70 -retry="TERM/30/KILL/30"
71 -
72 -depend() {
73 - use net
74 -}
75 -
76 -start_pre() {
77 - if [ -n "${MAX_MAP_COUNT}" -a -f /proc/sys/vm/max_map_count ]; then
78 - sysctl -q -w vm.max_map_count=${MAX_MAP_COUNT}
79 - fi
80 -
81 - checkpath -d -o "${ES_USER}:${ES_GROUP}" -m750 "/var/lib/elasticsearch"
82 - checkpath -d -o "${ES_USER}:${ES_GROUP}" -m750 "/var/log/elasticsearch"
83 - checkpath -d -o "${ES_USER}:${ES_GROUP}" -m750 "/run/elasticsearch"
84 - checkpath -d -o "${ES_USER}:${ES_GROUP}" -m750 "${ES_BASE_PATH}"
85 - checkpath -d -o "${ES_USER}:${ES_GROUP}" -m750 "${LOG_DIR}"
86 -}
87
88 diff --git a/app-misc/elasticsearch/files/elasticsearch.init.4 b/app-misc/elasticsearch/files/elasticsearch.init.4
89 deleted file mode 100644
90 index ac302776610..00000000000
91 --- a/app-misc/elasticsearch/files/elasticsearch.init.4
92 +++ /dev/null
93 @@ -1,67 +0,0 @@
94 -#!/sbin/openrc-run
95 -
96 -name="Elasticsearch"
97 -description="Elasticsearch Server"
98 -
99 -ES_INSTANCE=${SVCNAME#*.}
100 -
101 -if [ -n "${ES_INSTANCE}" ] && [ ${SVCNAME} != "elasticsearch" ]; then
102 - ES_BASE_PATH="/var/lib/elasticsearch/${ES_INSTANCE}"
103 - CONF_DIR="/etc/elasticsearch/${ES_INSTANCE}"
104 - DEFAULT_LOG_DIR="/var/log/elasticsearch/${ES_INSTANCE}"
105 -else
106 - ES_BASE_PATH="/var/lib/elasticsearch/_default"
107 - CONF_DIR="/etc/elasticsearch"
108 - DEFAULT_LOG_DIR="/var/log/elasticsearch/_default"
109 -fi
110 -
111 -ES_HOME=${ES_HOME:="/usr/share/elasticsearch"}
112 -ES_USER=${ES_USER:="elasticsearch"}
113 -ES_GROUP=${ES_GROUP:="elasticsearch"}
114 -ES_STARTUP_SLEEP_TIME=${ES_STARTUP_TIME:=5}
115 -MAX_OPEN_FILES=${MAX_OPEN_FILES:=65536}
116 -MAX_MAP_COUNT=${MAX_MAP_COUNT:=262144}
117 -
118 -DATA_DIR=${DATA_DIR:="${ES_BASE_PATH}/data"}
119 -LOG_DIR=${LOG_DIR:="${DEFAULT_LOG_DIR}"}
120 -
121 -if [ -f "${CONF_DIR}/elasticsearch.in.sh" ]; then
122 - ES_INCLUDE="${CONF_DIR}/elasticsearch.in.sh"
123 -fi
124 -
125 -export ES_INCLUDE
126 -export JAVA_HOME
127 -export JAVA_OPTS
128 -export ES_JVM_OPTIONS
129 -export ES_JAVA_OPTS
130 -export ES_STARTUP_SLEEP_TIME
131 -export ES_PATH_CONF="${CONF_DIR}"
132 -
133 -pidfile="/run/elasticsearch/${RC_SVCNAME}.pid"
134 -
135 -command="/usr/share/elasticsearch/bin/elasticsearch"
136 -command_args="--daemonize --pidfile=${pidfile} -Epath.logs=${LOG_DIR} -Epath.data=${DATA_DIR}"
137 -command_user="${ES_USER}:${ES_GROUP}"
138 -required_files="${CONF_DIR}/elasticsearch.yml"
139 -retry="TERM/30/KILL/30"
140 -
141 -depend() {
142 - use net
143 -}
144 -
145 -start_pre() {
146 - if [ -n "${MAX_MAP_COUNT}" -a -f /proc/sys/vm/max_map_count ]; then
147 - sysctl -q -w vm.max_map_count=${MAX_MAP_COUNT}
148 - fi
149 -
150 - checkpath -d -o "${ES_USER}:${ES_GROUP}" -m750 "/var/lib/elasticsearch"
151 - checkpath -d -o "${ES_USER}:${ES_GROUP}" -m750 "/var/log/elasticsearch"
152 - checkpath -d -o "${ES_USER}:${ES_GROUP}" -m750 "/run/elasticsearch"
153 - checkpath -d -o "${ES_USER}:${ES_GROUP}" -m750 "${ES_BASE_PATH}"
154 - checkpath -d -o "${ES_USER}:${ES_GROUP}" -m750 "${LOG_DIR}"
155 -
156 - # fails to start without keystore
157 - if [ ! -f "${CONF_DIR}/elasticsearch.keystore" ]; then
158 - "${ES_HOME}/bin/elasticsearch-keystore" create
159 - fi
160 -}
161
162 diff --git a/app-misc/elasticsearch/files/elasticsearch.service.2 b/app-misc/elasticsearch/files/elasticsearch.service.2
163 deleted file mode 100644
164 index 65324693e8c..00000000000
165 --- a/app-misc/elasticsearch/files/elasticsearch.service.2
166 +++ /dev/null
167 @@ -1,51 +0,0 @@
168 -[Unit]
169 -Description=Elasticsearch
170 -Documentation=https://www.elastic.co
171 -Wants=network.target
172 -After=network.target
173 -
174 -[Service]
175 -Environment=ES_HOME=/usr/share/elasticsearch
176 -Environment=ES_PATH_CONF=/etc/elasticsearch
177 -Environment=DATA_DIR=/var/lib/elasticsearch
178 -Environment=LOG_DIR=/var/log/elasticsearch
179 -Environment=PID_DIR=/run/elasticsearch
180 -EnvironmentFile=-/etc/conf.d/elasticsearch
181 -
182 -WorkingDirectory=/usr/share/elasticsearch
183 -
184 -User=elasticsearch
185 -Group=elasticsearch
186 -
187 -ExecStartPre=/usr/share/elasticsearch/bin/elasticsearch-systemd-pre-exec
188 -
189 -ExecStart=/usr/share/elasticsearch/bin/elasticsearch \
190 - -p ${PID_DIR}/elasticsearch.pid \
191 - -Epath.logs=${LOG_DIR} \
192 - -Epath.data=${DATA_DIR}
193 -
194 -StandardOutput=journal
195 -StandardError=inherit
196 -
197 -# Specifies the maximum file descriptor number that can be opened by this process
198 -LimitNOFILE=65536
199 -
200 -# Specifies the maximum number of bytes of memory that may be locked into RAM
201 -# Set to "infinity" if you use the 'bootstrap.memory_lock: true' option
202 -# in elasticsearch.yml and 'MAX_LOCKED_MEMORY=unlimited' in /etc/conf.d/elasticsearch
203 -#LimitMEMLOCK=infinity
204 -
205 -# Disable timeout logic and wait until process is stopped
206 -TimeoutStopSec=0
207 -
208 -# SIGTERM signal is used to stop the Java process
209 -KillSignal=SIGTERM
210 -
211 -# Java process is never killed
212 -SendSIGKILL=no
213 -
214 -# When a JVM receives a SIGTERM signal it exits with code 143
215 -SuccessExitStatus=143
216 -
217 -[Install]
218 -WantedBy=multi-user.target