-
Notifications
You must be signed in to change notification settings - Fork 68
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
[FEATURE] Add support for OPENSEARCH_JAVA_HOME #133
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,15 +14,20 @@ else | |
OPENSEARCH_HOME=$1 | ||
fi | ||
|
||
if [ -z "$2" ]; then | ||
if [ -z "$JAVA_HOME" ]; then | ||
echo "JAVA_HOME needs to be set or passed in as the second parameter." | ||
exit 1 | ||
fi | ||
else | ||
if [ ! -z "$2" ]; then | ||
JAVA_HOME=$2 | ||
elif [ ! -z "$OPENSEARCH_JAVA_HOME" ]; then | ||
# Use OPENSEARCH_JAVA_HOME if present | ||
JAVA_HOME=$OPENSEARCH_JAVA_HOME | ||
elif [ -z "$JAVA_HOME" ]; then | ||
# Nor OPENSEARCH_JAVA_HOME nor JAVA_HOME is present, failing | ||
echo "OPENSEARCH_JAVA_HOME / JAVA_HOME needs to be set or passed in as the second parameter." | ||
exit 1 | ||
fi | ||
|
||
echo "Using JAVA_HOME: $JAVA_HOME" | ||
export JAVA_HOME=$JAVA_HOME | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Interestingly, the
or
Adding There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🤦 |
||
|
||
# Instead of the supervisor executing performance-analyzer-agent from the plugin location, | ||
# we should move this to the reader. The entry-point script should be executing | ||
# performance-analyzer-agent from the reader location. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These nested ifs are getting very confusing. Maybe swap them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 done!