From 12aa4a5b0c7e65a329886968cb3d764c25767594 Mon Sep 17 00:00:00 2001 From: Mark Elliot Date: Sun, 3 Jul 2016 13:45:42 -0400 Subject: [PATCH] Workaround for bad environment management --- src/main/resources/check.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main/resources/check.sh b/src/main/resources/check.sh index b57778a6..c3182a00 100644 --- a/src/main/resources/check.sh +++ b/src/main/resources/check.sh @@ -25,6 +25,13 @@ CHECK_ARGS="@checkArgs@" SERVICE_HOME=${SERVICE_HOME:-$(cd "$(dirname "$0")/../../../" && pwd)} cd "$SERVICE_HOME" +# prefer java 8 when available to deal with poor environment management +if [ -n "$JAVA_8_HOME" ]; then + export JAVA_HOME=$JAVA_8_HOME +fi + +source service/bin/config.sh + # now check health printf "%-50s" "Checking health of '$SERVICE'..." $SERVICE_CMD $CHECK_ARGS