Remove redundant Java check from Sys V init (#45793)

In the Sys V init scripts, we check for Java. This is not needed, since
the same check happens in elasticsearch-env when starting up. Having
this duplicate check has bitten us in the past, where we made a change
to the logic in elasticsearch-env, but missed updating it here. Since
there is no need for this duplicate check, we remove it from the Sys V
init scripts.
This commit is contained in:
Jason Tedor 2019-08-22 22:20:56 -04:00
parent de6b6fd338
commit 243f054b0b
No known key found for this signature in database
GPG Key ID: FA89F05560F16BC5
2 changed files with 0 additions and 28 deletions

View File

@ -80,22 +80,8 @@ if [ ! -x "$DAEMON" ]; then
exit 1
fi
checkJava() {
if [ ! -z "${JAVA_HOME}" ]; then
JAVA="${JAVA_HOME}"/bin/java
else
JAVA="${ES_HOME}"/jdk/bin/java
fi
if [ ! -x "$JAVA" ]; then
echo "could not find java in JAVA_HOME or bundled at ${JAVA}"
exit 1
fi
}
case "$1" in
start)
checkJava
log_daemon_msg "Starting $DESC"

View File

@ -67,21 +67,7 @@ if [ ! -x "$exec" ]; then
exit 1
fi
checkJava() {
if [ ! -z "${JAVA_HOME}" ]; then
JAVA="${JAVA_HOME}"/bin/java
else
JAVA="${ES_HOME}"/jdk/bin/java
fi
if [ ! -x "$JAVA" ]; then
echo "could not find java in JAVA_HOME or bundled at ${JAVA}"
exit 1
fi
}
start() {
checkJava
[ -x $exec ] || exit 5
if [ -n "$MAX_OPEN_FILES" ]; then