mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-06 13:08:29 +00:00
This commit utilizes the elasticsearch-env script that is added in core Elasticsearch for significantly simplifying the scripts used in x-pack. Relates elastic/x-pack-elasticsearch#2049 Original commit: elastic/x-pack-elasticsearch@8ef041d077
19 lines
614 B
Bash
19 lines
614 B
Bash
#!/bin/bash
|
|
|
|
# Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
# or more contributor license agreements. Licensed under the Elastic License;
|
|
# you may not use this file except in compliance with the Elastic License.
|
|
|
|
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[@]}"
|
|
status=$?
|
|
cd - > /dev/null
|
|
exit $status
|