@@ -495,9 +495,10 @@ function jetty_port() {
495
495
# useful for doing cross-platform work from the command-line using Java
496
496
function run_tool() {
497
497
498
- # shellcheck disable=SC2086
498
+ # shellcheck disable=SC2086,SC2164
499
499
" $JAVA " $SOLR_SSL_OPTS $AUTHC_OPTS ${SOLR_ZK_CREDS_AND_ACLS:- } ${SOLR_TOOL_OPTS:- } -Dsolr.install.dir=" $SOLR_TIP " \
500
500
-Dlog4j.configurationFile=" $DEFAULT_SERVER_DIR /resources/log4j2-console.xml" -Dsolr.pid.dir=" $SOLR_PID_DIR " \
501
+ -Djava.io.tmpdir=" $( cd " ${TMPDIR:- ${TEMP:- ${TMP:-/ tmp} } } " ; pwd -P) " \
501
502
-classpath " $DEFAULT_SERVER_DIR /solr-webapp/webapp/WEB-INF/lib/*:$DEFAULT_SERVER_DIR /lib/ext/*:$DEFAULT_SERVER_DIR /lib/*" \
502
503
org.apache.solr.cli.SolrCLI " $@ "
503
504
@@ -517,8 +518,9 @@ function stop_solr() {
517
518
518
519
if [ -n " $SOLR_PID " ]; then
519
520
echo -e " Sending stop command to Solr running on port $SOLR_PORT ... waiting up to $SOLR_STOP_WAIT seconds to allow Jetty process $SOLR_PID to stop gracefully."
520
- # shellcheck disable=SC2086
521
- " $JAVA " $SOLR_SSL_OPTS $AUTHC_OPTS ${SOLR_TOOL_OPTS:- } -jar " $DIR /start.jar" " STOP.PORT=$THIS_STOP_PORT " " STOP.KEY=$STOP_KEY " --stop || true
521
+ # shellcheck disable=SC2086,SC2164
522
+ " $JAVA " -Djava.io.tmpdir=" $( cd " ${TMPDIR:- ${TEMP:- ${TMP:-/ tmp} } } " ; pwd -P) " $SOLR_SSL_OPTS $AUTHC_OPTS ${SOLR_TOOL_OPTS:- } \
523
+ -jar " $DIR /start.jar" " STOP.PORT=$THIS_STOP_PORT " " STOP.KEY=$STOP_KEY " --stop || true
522
524
(loops=0
523
525
while true
524
526
do
@@ -1311,9 +1313,11 @@ function start_solr() {
1311
1313
# Add vector optimizations module
1312
1314
SCRIPT_SOLR_OPTS+=(" --add-modules" " jdk.incubator.vector" )
1313
1315
1316
+ # shellcheck disable=SC2164
1314
1317
SOLR_START_OPTS=(' -server' " ${JAVA_MEM_OPTS[@]} " " ${GC_TUNE_ARR[@]} " " ${GC_LOG_OPTS[@]} " " ${IP_ACL_OPTS[@]} " \
1315
1318
" ${REMOTE_JMX_OPTS[@]} " " ${CLOUD_MODE_OPTS[@]} " -Dsolr.log.dir=" $SOLR_LOGS_DIR " \
1316
1319
" -Djetty.port=$SOLR_PORT " " -DSTOP.PORT=$stop_port " " -DSTOP.KEY=$STOP_KEY " \
1320
+ " -Djava.io.tmpdir=$( cd " ${TMPDIR:- ${TEMP:- ${TMP:-/ tmp} } } " ; pwd -P) " \
1317
1321
# '-OmitStackTraceInFastThrow' ensures stack traces in errors,
1318
1322
# users who don't care about useful error msgs can override in SOLR_OPTS with +OmitStackTraceInFastThrow
1319
1323
" ${SOLR_HOST_ARG[@]} " " -Duser.timezone=$SOLR_TIMEZONE " " -XX:-OmitStackTraceInFastThrow" \
0 commit comments