2016-05-10 15:07:04 -04:00
|
|
|
#!/bin/bash
|
2015-07-13 06:31:34 -04:00
|
|
|
|
|
|
|
# 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.
|
|
|
|
|
2017-07-20 20:39:46 -04:00
|
|
|
source "`dirname "$0"`"/../elasticsearch-env
|
2015-07-13 06:31:34 -04:00
|
|
|
|
2017-07-20 20:39:46 -04:00
|
|
|
source "`dirname "$0"`"/x-pack-env
|
2015-09-25 23:55:54 -04:00
|
|
|
|
2016-05-19 14:09:49 -04:00
|
|
|
declare -a args=("$@")
|
2017-07-20 20:39:46 -04:00
|
|
|
args=("${args[@]}" --path.conf "$CONF_DIR")
|
2016-05-19 14:09:49 -04:00
|
|
|
|
2015-09-11 11:15:19 -04:00
|
|
|
cd "$ES_HOME" > /dev/null
|
2017-07-20 20:39:46 -04:00
|
|
|
"$JAVA" $ES_JAVA_OPTS -Des.path.home="$ES_HOME" -cp "$ES_CLASSPATH" org.elasticsearch.xpack.security.authc.file.tool.UsersTool "${args[@]}"
|
2015-07-13 06:31:34 -04:00
|
|
|
status=$?
|
|
|
|
cd - > /dev/null
|
|
|
|
exit $status
|