diff --git a/elasticsearch/x-pack/bin/x-pack/extension b/elasticsearch/x-pack/bin/x-pack/extension index e2c9305a60f..56405637625 100755 --- a/elasticsearch/x-pack/bin/x-pack/extension +++ b/elasticsearch/x-pack/bin/x-pack/extension @@ -62,12 +62,10 @@ fi # Try to read package config files if [ -f "/etc/sysconfig/elasticsearch" ]; then CONF_DIR=/etc/elasticsearch - CONF_FILE=$CONF_DIR/elasticsearch.yml . "/etc/sysconfig/elasticsearch" elif [ -f "/etc/default/elasticsearch" ]; then CONF_DIR=/etc/elasticsearch - CONF_FILE=$CONF_DIR/elasticsearch.yml . "/etc/default/elasticsearch" fi @@ -109,6 +107,12 @@ export HOSTNAME=`hostname -s` # include x-pack jars in classpath ES_CLASSPATH="$ES_CLASSPATH:$ES_HOME/plugins/x-pack/*" +# CONF_FILE setting was removed +if [ ! -z "$CONF_FILE" ]; then + echo "CONF_FILE setting is no longer supported. elasticsearch.yml must be placed in the config directory and cannot be renamed." + exit 1 +fi + cd "$ES_HOME" > /dev/null "$JAVA" $ES_JAVA_OPTS -cp "$ES_CLASSPATH" -Des.path.home="$ES_HOME" $properties org.elasticsearch.xpack.extensions.XPackExtensionCli "$@" status=$? diff --git a/elasticsearch/x-pack/shield/bin/x-pack/syskeygen b/elasticsearch/x-pack/shield/bin/x-pack/syskeygen index 1918c0d99ec..0d31e25136a 100755 --- a/elasticsearch/x-pack/shield/bin/x-pack/syskeygen +++ b/elasticsearch/x-pack/shield/bin/x-pack/syskeygen @@ -62,12 +62,10 @@ fi # Try to read package config files if [ -f "/etc/sysconfig/elasticsearch" ]; then CONF_DIR=/etc/elasticsearch - CONF_FILE=$CONF_DIR/elasticsearch.yml . "/etc/sysconfig/elasticsearch" elif [ -f "/etc/default/elasticsearch" ]; then CONF_DIR=/etc/elasticsearch - CONF_FILE=$CONF_DIR/elasticsearch.yml . "/etc/default/elasticsearch" fi @@ -103,14 +101,6 @@ if [ -e "$CONF_DIR" ]; then ;; esac fi -if [ -e "$CONF_FILE" ]; then - case "$properties" in - *-Des.default.config=*) ;; - *) - properties="$properties -Des.default.config=$CONF_FILE" - ;; - esac -fi export HOSTNAME=`hostname -s` @@ -125,6 +115,12 @@ if [ "x$JAVA_TOOL_OPTIONS" != "x" ]; then unset JAVA_TOOL_OPTIONS fi +# CONF_FILE setting was removed +if [ ! -z "$CONF_FILE" ]; then + echo "CONF_FILE setting is no longer supported. elasticsearch.yml must be placed in the config directory and cannot be renamed." + exit 1 +fi + cd "$ES_HOME" > /dev/null "$JAVA" $ES_JAVA_OPTS -cp "$ES_CLASSPATH" -Des.path.home="$ES_HOME" $properties org.elasticsearch.shield.crypto.tool.SystemKeyTool "$@" status=$? diff --git a/elasticsearch/x-pack/shield/bin/x-pack/users b/elasticsearch/x-pack/shield/bin/x-pack/users index a2430820dc2..b8f3af686e4 100755 --- a/elasticsearch/x-pack/shield/bin/x-pack/users +++ b/elasticsearch/x-pack/shield/bin/x-pack/users @@ -62,12 +62,10 @@ fi # Try to read package config files if [ -f "/etc/sysconfig/elasticsearch" ]; then CONF_DIR=/etc/elasticsearch - CONF_FILE=$CONF_DIR/elasticsearch.yml . "/etc/sysconfig/elasticsearch" elif [ -f "/etc/default/elasticsearch" ]; then CONF_DIR=/etc/elasticsearch - CONF_FILE=$CONF_DIR/elasticsearch.yml . "/etc/default/elasticsearch" fi @@ -103,14 +101,6 @@ if [ -e "$CONF_DIR" ]; then ;; esac fi -if [ -e "$CONF_FILE" ]; then - case "$properties" in - *-Des.default.config=*) ;; - *) - properties="$properties -Des.default.config=$CONF_FILE" - ;; - esac -fi export HOSTNAME=`hostname -s` @@ -125,6 +115,12 @@ if [ "x$JAVA_TOOL_OPTIONS" != "x" ]; then unset JAVA_TOOL_OPTIONS fi +# CONF_FILE setting was removed +if [ ! -z "$CONF_FILE" ]; then + echo "CONF_FILE setting is no longer supported. elasticsearch.yml must be placed in the config directory and cannot be renamed." + exit 1 +fi + cd "$ES_HOME" > /dev/null "$JAVA" $ES_JAVA_OPTS -cp "$ES_CLASSPATH" -Des.path.home="$ES_HOME" $properties org.elasticsearch.shield.authc.file.tool.UsersTool "$@" status=$? diff --git a/elasticsearch/x-pack/watcher/bin/x-pack/croneval b/elasticsearch/x-pack/watcher/bin/x-pack/croneval index 7fb4f6a6328..1a13b517e5e 100755 --- a/elasticsearch/x-pack/watcher/bin/x-pack/croneval +++ b/elasticsearch/x-pack/watcher/bin/x-pack/croneval @@ -62,12 +62,10 @@ fi # Try to read package config files if [ -f "/etc/sysconfig/elasticsearch" ]; then CONF_DIR=/etc/elasticsearch - CONF_FILE=$CONF_DIR/elasticsearch.yml . "/etc/sysconfig/elasticsearch" elif [ -f "/etc/default/elasticsearch" ]; then CONF_DIR=/etc/elasticsearch - CONF_FILE=$CONF_DIR/elasticsearch.yml . "/etc/default/elasticsearch" fi @@ -94,14 +92,6 @@ if [ -e "$CONF_DIR" ]; then ;; esac fi -if [ -e "$CONF_FILE" ]; then - case "$properties" in - *-Des.default.config=*) ;; - *) - properties="$properties -Des.default.config=$CONF_FILE" - ;; - esac -fi export HOSTNAME=`hostname -s` @@ -116,6 +106,12 @@ if [ "x$JAVA_TOOL_OPTIONS" != "x" ]; then unset JAVA_TOOL_OPTIONS fi +# CONF_FILE setting was removed +if [ ! -z "$CONF_FILE" ]; then + echo "CONF_FILE setting is no longer supported. elasticsearch.yml must be placed in the config directory and cannot be renamed." + exit 1 +fi + cd "$ES_HOME" > /dev/null "$JAVA" $ES_JAVA_OPTS -cp "$ES_CLASSPATH" -Des.path.home="$ES_HOME" org.elasticsearch.watcher.trigger.schedule.tool.CronEvalTool "$@" $properties status=$?