diff --git a/plugin/bin/x-pack/certgen b/plugin/bin/x-pack/certgen index 163a8c645ad..731859331c3 100644 --- a/plugin/bin/x-pack/certgen +++ b/plugin/bin/x-pack/certgen @@ -8,11 +8,16 @@ source "`dirname "$0"`"/../elasticsearch-env source "`dirname "$0"`"/x-pack-env -declare -a args=("$@") -args=("${args[@]}" --path.conf "$CONF_DIR") - cd "$ES_HOME" > /dev/null -"$JAVA" $ES_JAVA_OPTS -Des.path.home="$ES_HOME" -cp "$ES_CLASSPATH" org.elasticsearch.xpack.ssl.CertificateTool "${args[@]}" + +"$JAVA" \ + $ES_JAVA_OPTS \ + -Des.path.home="$ES_HOME" \ + -Des.path.conf="$CONF_DIR" \ + -cp "$ES_CLASSPATH" \ + org.elasticsearch.xpack.ssl.CertificateTool \ + "$@" + status=$? cd - > /dev/null exit $status diff --git a/plugin/bin/x-pack/croneval b/plugin/bin/x-pack/croneval index 56629de521c..88714c2afab 100755 --- a/plugin/bin/x-pack/croneval +++ b/plugin/bin/x-pack/croneval @@ -9,7 +9,15 @@ source "`dirname "$0"`"/../elasticsearch-env source "`dirname "$0"`"/x-pack-env cd "$ES_HOME" > /dev/null -"$JAVA" $ES_JAVA_OPTS -Des.path.home="$ES_HOME" -cp "$ES_CLASSPATH" org.elasticsearch.xpack.watcher.trigger.schedule.tool.CronEvalTool "$@" + +"$JAVA" \ + $ES_JAVA_OPTS \ + -Des.path.home="$ES_HOME" \ + -Des.path.conf="$CONF_DIR" \ + -cp "$ES_CLASSPATH" \ + org.elasticsearch.xpack.watcher.trigger.schedule.tool.CronEvalTool \ + "$@" + status=$? cd - > /dev/null exit $status diff --git a/plugin/bin/x-pack/extension b/plugin/bin/x-pack/extension index 0bbfaf7afa0..6010a1101d1 100755 --- a/plugin/bin/x-pack/extension +++ b/plugin/bin/x-pack/extension @@ -8,11 +8,16 @@ source "`dirname "$0"`"/../elasticsearch-env source "`dirname "$0"`"/x-pack-env -declare -a args=("$@") -args=("${args[@]}" --path.conf "$CONF_DIR") - cd "$ES_HOME" > /dev/null -"$JAVA" $ES_JAVA_OPTS -Des.path.home="$ES_HOME" -cp "$ES_CLASSPATH" org.elasticsearch.xpack.extensions.XPackExtensionCli "${args[@]}" + +"$JAVA" \ + $ES_JAVA_OPTS \ + -Des.path.home="$ES_HOME" \ + -Des.path.conf="$CONF_DIR" \ + -cp "$ES_CLASSPATH" \ + org.elasticsearch.xpack.extensions.XPackExtensionCli \ + "$@" + status=$? cd - > /dev/null exit $status diff --git a/plugin/bin/x-pack/migrate b/plugin/bin/x-pack/migrate index ded08408c8c..f0153f8fd15 100755 --- a/plugin/bin/x-pack/migrate +++ b/plugin/bin/x-pack/migrate @@ -8,11 +8,16 @@ source "`dirname "$0"`"/../elasticsearch-env source "`dirname "$0"`"/x-pack-env -declare -a args=("$@") -args=("${args[@]}" --path.conf "$CONF_DIR") - cd "$ES_HOME" > /dev/null -"$JAVA" $ES_JAVA_OPTS -Des.path.home="$ES_HOME" -cp "$ES_CLASSPATH" org.elasticsearch.xpack.security.authc.esnative.ESNativeRealmMigrateTool "${args[@]}" + +"$JAVA" \ + $ES_JAVA_OPTS \ + -Des.path.home="$ES_HOME" \ + -Des.path.conf="$CONF_DIR" \ + -cp "$ES_CLASSPATH" \ + org.elasticsearch.xpack.security.authc.esnative.ESNativeRealmMigrateTool \ + "$@" + status=$? cd - > /dev/null exit $status diff --git a/plugin/bin/x-pack/setup-passwords b/plugin/bin/x-pack/setup-passwords index e9daa0813b6..8516ef8bb4f 100644 --- a/plugin/bin/x-pack/setup-passwords +++ b/plugin/bin/x-pack/setup-passwords @@ -8,11 +8,16 @@ source "`dirname "$0"`"/../elasticsearch-env source "`dirname "$0"`"/x-pack-env -declare -a args=("$@") -args=("${args[@]}" --path.conf "$CONF_DIR") - cd "$ES_HOME" > /dev/null -"$JAVA" $ES_JAVA_OPTS -Des.path.home="$ES_HOME" -cp "$ES_CLASSPATH" org.elasticsearch.xpack.security.authc.esnative.tool.SetupPasswordTool "${args[@]}" + +"$JAVA" \ + $ES_JAVA_OPTS \ + -Des.path.home="$ES_HOME" \ + -Des.path.conf="$CONF_DIR" \ + -cp "$ES_CLASSPATH" \ + org.elasticsearch.xpack.security.authc.esnative.tool.SetupPasswordTool \ + "$@" + status=$? cd - > /dev/null exit $status diff --git a/plugin/bin/x-pack/syskeygen b/plugin/bin/x-pack/syskeygen index 6b62dbe9d21..080159d3f46 100755 --- a/plugin/bin/x-pack/syskeygen +++ b/plugin/bin/x-pack/syskeygen @@ -8,11 +8,16 @@ source "`dirname "$0"`"/../elasticsearch-env source "`dirname "$0"`"/x-pack-env -declare -a args=("$@") -args=("${args[@]}" --path.conf "$CONF_DIR") - cd "$ES_HOME" > /dev/null -"$JAVA" $ES_JAVA_OPTS -Des.path.home="$ES_HOME" -cp "$ES_CLASSPATH" org.elasticsearch.xpack.security.crypto.tool.SystemKeyTool "${args[@]}" + +"$JAVA" \ + $ES_JAVA_OPTS \ + -Des.path.home="$ES_HOME" \ + -Des.path.conf="$CONF_DIR" \ + -cp "$ES_CLASSPATH" \ + org.elasticsearch.xpack.security.crypto.tool.SystemKeyTool \ + "$@" + status=$? cd - > /dev/null exit $status diff --git a/plugin/bin/x-pack/users b/plugin/bin/x-pack/users index 2ff978feb12..086549ffbaa 100755 --- a/plugin/bin/x-pack/users +++ b/plugin/bin/x-pack/users @@ -8,11 +8,16 @@ source "`dirname "$0"`"/../elasticsearch-env source "`dirname "$0"`"/x-pack-env -declare -a args=("$@") -args=("${args[@]}" --path.conf "$CONF_DIR") - cd "$ES_HOME" > /dev/null -"$JAVA" $ES_JAVA_OPTS -Des.path.home="$ES_HOME" -cp "$ES_CLASSPATH" org.elasticsearch.xpack.security.authc.file.tool.UsersTool "${args[@]}" + +"$JAVA" \ + $ES_JAVA_OPTS \ + -Des.path.home="$ES_HOME" \ + -Des.path.conf="$CONF_DIR" \ + -cp "$ES_CLASSPATH" \ + org.elasticsearch.xpack.security.authc.file.tool.UsersTool \ + "$@" + status=$? cd - > /dev/null exit $status