From 581293aed58a1e14aa34ebe521372d287c2af0d0 Mon Sep 17 00:00:00 2001 From: Jason Tedor Date: Thu, 20 Jul 2017 19:49:28 +0900 Subject: [PATCH] Fix croneval script to respect CONF_DIR This commit fixes the croneval script to respect the CONF_DIR environment variable used to locate the configuration directory. Original commit: elastic/x-pack-elasticsearch@79974947f9bc7a3193e1b14373c46319d949af95 --- plugin/bin/x-pack/croneval | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugin/bin/x-pack/croneval b/plugin/bin/x-pack/croneval index 28190c12986..c8743e3423c 100755 --- a/plugin/bin/x-pack/croneval +++ b/plugin/bin/x-pack/croneval @@ -76,6 +76,10 @@ fi declare -a args=("$@") +if [ -e "$CONF_DIR" ]; then + args=("${args[@]}" --path.conf "$CONF_DIR") +fi + cd "$ES_HOME" > /dev/null "$JAVA" $ES_JAVA_OPTS -cp "$ES_CLASSPATH" -Des.path.home="$ES_HOME" org.elasticsearch.xpack.watcher.trigger.schedule.tool.CronEvalTool "${args[@]}" status=$?