Warn in bin/elasticsearch if JAVA_OPTS is set
JAVA_OPTS is not a built-in mechanism for passing options to the JVM but many people think that it is. We do not respect JAVA_OPTS, but this commit adds a warning if it is set in case the end-user thinks that it will affect Elasticsearch.
This commit is contained in:
parent
9460289bee
commit
7743c422db
|
@ -136,6 +136,13 @@ if [ "x$JAVA_TOOL_OPTIONS" != "x" ]; then
|
|||
unset JAVA_TOOL_OPTIONS
|
||||
fi
|
||||
|
||||
# JAVA_OPTS is not a built-in JVM mechanism but some people think it is
|
||||
# so let us warn them that we are not observing the value of $JAVA_OPTS
|
||||
if [ ! -z "JAVA_OPTS" ]; then
|
||||
echo "Warning: Ignoring JAVA_OPTS=$JAVA_OPTS"
|
||||
echo "Please pass JVM parameters via ES_JAVA_OPTS instead"
|
||||
fi
|
||||
|
||||
# full hostname passed through cut for portability on systems that do not support hostname -s
|
||||
# export on separate line for shells that do not support combining definition and export
|
||||
HOSTNAME=`hostname | cut -d. -f1`
|
||||
|
|
Loading…
Reference in New Issue