app-misc/elasticsearch: allow to override LOG_DIR
authorTomas Mozes <hydrapolic@gmail.com>
Thu, 24 May 2018 12:04:07 +0000 (14:04 +0200)
committerAaron Bauman <bman@gentoo.org>
Fri, 25 May 2018 13:14:01 +0000 (09:14 -0400)
Closes: https://bugs.gentoo.org/654630
Package-Manager: Portage-2.3.38, Repoman-2.3.9
Closes: https://github.com/gentoo/gentoo/pull/8547

app-misc/elasticsearch/files/elasticsearch.init.3

index ab086197ec9118de2d9e1da4b60593cd252e73d9..cd89acd9f99805a4d8ff6ab1122d7a687852bfaf 100644 (file)
@@ -8,11 +8,11 @@ ES_INSTANCE=${SVCNAME#*.}
 if [ -n "${ES_INSTANCE}" ] && [ ${SVCNAME} != "elasticsearch" ]; then
        ES_BASE_PATH="/var/lib/elasticsearch/${ES_INSTANCE}"
        CONF_DIR="/etc/elasticsearch/${ES_INSTANCE}"
-       LOG_DIR="/var/log/elasticsearch/${ES_INSTANCE}"
+       DEFAULT_LOG_DIR="/var/log/elasticsearch/${ES_INSTANCE}"
 else
        ES_BASE_PATH="/var/lib/elasticsearch/_default"
        CONF_DIR="/etc/elasticsearch"
-       LOG_DIR="/var/log/elasticsearch/_default"
+       DEFAULT_LOG_DIR="/var/log/elasticsearch/_default"
 fi
 
 ES_HOME=${ES_HOME:="/usr/share/elasticsearch"}
@@ -23,6 +23,7 @@ MAX_OPEN_FILES=${MAX_OPEN_FILES:=65536}
 MAX_MAP_COUNT=${MAX_MAP_COUNT:=262144}
 
 DATA_DIR=${DATA_DIR:="${ES_BASE_PATH}/data"}
+LOG_DIR=${LOG_DIR:="${DEFAULT_LOG_DIR}"}
 
 if [ -f "${CONF_DIR}/elasticsearch.in.sh" ]; then
     ES_INCLUDE="${CONF_DIR}/elasticsearch.in.sh"