Skip to content

Commit

Permalink
Export ES_JAVA_HOME in Sys V init scripts (#69278)
Browse files Browse the repository at this point in the history
This commit exports the ES_JAVA_HOME environment variable in the Sys V
init scripts. This is needed so that if a user configures ES_JAVA_HOME
in their environment via /etc/default/elasticsearch (the Debian package)
/etc/sysconfig/elasticsearch (the RPM package), then it is exported and
visible to the elasticsearch-env script that determines the location of
Java from this environment variable.
  • Loading branch information
jasontedor committed Feb 19, 2021
1 parent d3c22c0 commit 171d478
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions distribution/packages/src/deb/init.d/elasticsearch
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ DAEMON=$ES_HOME/bin/elasticsearch
DAEMON_OPTS="-d -p $PID_FILE"

export ES_JAVA_OPTS
export ES_JAVA_HOME
export JAVA_HOME
export ES_PATH_CONF

Expand Down
1 change: 1 addition & 0 deletions distribution/packages/src/rpm/init.d/elasticsearch
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ prog="elasticsearch"
pidfile="$PID_DIR/${prog}.pid"

export ES_JAVA_OPTS
export ES_JAVA_HOME
export JAVA_HOME
export ES_PATH_CONF
export ES_STARTUP_SLEEP_TIME
Expand Down

0 comments on commit 171d478

Please sign in to comment.