Skip to content

Always set default ES_PATH_CONF for package scriptlets #51827

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions distribution/packages/src/common/env/elasticsearch
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#JAVA_HOME=

# Elasticsearch configuration directory
# Note: this setting will be shared with command-line tools
ES_PATH_CONF=${path.conf}

# Elasticsearch PID directory
Expand Down
4 changes: 2 additions & 2 deletions distribution/packages/src/common/scripts/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
# source the default env file
if [ -f "${path.env}" ]; then
. "${path.env}"
else
ES_PATH_CONF="${path.conf}"
fi

export ES_PATH_CONF=${ES_PATH_CONF:-${path.conf}}

IS_UPGRADE=false

case "$1" in
Expand Down
4 changes: 2 additions & 2 deletions distribution/packages/src/common/scripts/postrm
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
# source the default env file
if [ -f "${path.env}" ]; then
. "${path.env}"
else
ES_PATH_CONF="${path.conf}"
fi

export ES_PATH_CONF=${ES_PATH_CONF:-${path.conf}}

REMOVE_DIRS=false
REMOVE_USER_AND_GROUP=false

Expand Down
4 changes: 2 additions & 2 deletions distribution/packages/src/common/scripts/posttrans
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# source the default env file
if [ -f "${path.env}" ]; then
. "${path.env}"
else
ES_PATH_CONF="${path.conf}"
fi

export ES_PATH_CONF=${ES_PATH_CONF:-${path.conf}}

if [ ! -f "${ES_PATH_CONF}"/elasticsearch.keystore ]; then
/usr/share/elasticsearch/bin/elasticsearch-keystore create
chown root:elasticsearch "${ES_PATH_CONF}"/elasticsearch.keystore
Expand Down
4 changes: 2 additions & 2 deletions distribution/packages/src/common/scripts/preinst
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ err_exit() {
# source the default env file
if [ -f "${path.env}" ]; then
. "${path.env}"
else
ES_PATH_CONF="${path.conf}"
fi

export ES_PATH_CONF=${ES_PATH_CONF:-${path.conf}}

case "$1" in

# Debian ####################################################
Expand Down
4 changes: 2 additions & 2 deletions distribution/packages/src/common/scripts/prerm
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
# source the default env file
if [ -f "${path.env}" ]; then
. "${path.env}"
else
ES_PATH_CONF="${path.conf}"
fi

export ES_PATH_CONF=${ES_PATH_CONF:-${path.conf}}

STOP_REQUIRED=false
REMOVE_SERVICE=false

Expand Down