mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-22 21:05:23 +00:00
Don't create tempdir for cli scripts (#41913)
The elasticsearch-cli helper script does not use the tempdir created by elasticsearch-env, yet the env script still creates it. This can lead to lots of temp directories being created when running cli scripts in an automated fashion. This commit passes a fake tmpdir to the env script to avoid creation. closes #34445
This commit is contained in:
parent
2244697219
commit
9944fdf237
@ -16,6 +16,10 @@
|
||||
|
||||
source "`dirname "$0"`"/elasticsearch-env
|
||||
|
||||
if [ -z "$ES_TMPDIR" ]; then
|
||||
ES_TMPDIR=`"$JAVA" -cp "$ES_CLASSPATH" org.elasticsearch.tools.launchers.TempDirectory`
|
||||
fi
|
||||
|
||||
ES_JVM_OPTIONS="$ES_PATH_CONF"/jvm.options
|
||||
JVM_OPTIONS=`"$JAVA" -cp "$ES_CLASSPATH" org.elasticsearch.tools.launchers.JvmOptionsParser "$ES_JVM_OPTIONS"`
|
||||
ES_JAVA_OPTS="${JVM_OPTIONS//\$\{ES_TMPDIR\}/$ES_TMPDIR}"
|
||||
|
@ -84,8 +84,4 @@ ES_DISTRIBUTION_FLAVOR=${es.distribution.flavor}
|
||||
ES_DISTRIBUTION_TYPE=${es.distribution.type}
|
||||
ES_BUNDLED_JDK=${es.bundled_jdk}
|
||||
|
||||
if [ -z "$ES_TMPDIR" ]; then
|
||||
ES_TMPDIR=`"$JAVA" -cp "$ES_CLASSPATH" org.elasticsearch.tools.launchers.TempDirectory`
|
||||
fi
|
||||
|
||||
cd "$ES_HOME"
|
||||
|
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user