aboutsummaryrefslogtreecommitdiffstats
path: root/community/elasticsearch/elasticsearch.post-upgrade
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2019-01-23 14:56:52 +0100
committerJakub Jirutka <jakub@jirutka.cz>2019-01-23 16:15:07 +0100
commit7c4e67edf985e3386d882973bd78662a9296a750 (patch)
tree3352bdd73399679a1a098d26605b8892f90b8a72 /community/elasticsearch/elasticsearch.post-upgrade
parent46bd6e6b18d0e5b919c717db21bce3243a8306b3 (diff)
downloadaports-7c4e67edf985e3386d882973bd78662a9296a750.tar.bz2
aports-7c4e67edf985e3386d882973bd78662a9296a750.tar.xz
community/elasticsearch: fix and improve init script
* SVCNAME is deprecated for a very long time, RC_SVCNAME should be used * nice 0 is the default value, not needed to define * error.log was previously owned by root instead of the ES user, so we need to fix it
Diffstat (limited to 'community/elasticsearch/elasticsearch.post-upgrade')
-rw-r--r--community/elasticsearch/elasticsearch.post-upgrade11
1 files changed, 11 insertions, 0 deletions
diff --git a/community/elasticsearch/elasticsearch.post-upgrade b/community/elasticsearch/elasticsearch.post-upgrade
new file mode 100644
index 0000000000..af936afd41
--- /dev/null
+++ b/community/elasticsearch/elasticsearch.post-upgrade
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+ver_new="$1"
+ver_old="$2"
+
+if [ "$(apk version -t "$ver_old" "6.4.1-r1")" = "<" ]; then
+ chown elastico:elastico /var/log/elasticsearch/error.log 2>/dev/null
+ chown elastico:elastico /var/log/elasticsearch/*/error.log 2>/dev/null
+fi
+
+exit 0