Skip to content
Snippets Groups Projects
Commit 60b56c3c authored by Ulf Seltmann's avatar Ulf Seltmann Committed by Demian Katz
Browse files

added env variable to pass more options to solr binary (#939)

- Resolves VUFIND-1224
parent 21f8d89f
No related merge requests found
...@@ -22,6 +22,9 @@ rem JAVA_HOME ...@@ -22,6 +22,9 @@ rem JAVA_HOME
rem Home of Java installation (not directly used by this script, but passed along to rem Home of Java installation (not directly used by this script, but passed along to
rem the standard Solr control script). rem the standard Solr control script).
rem rem
rem SOLR_ADDITIONAL_START_OPTIONS
rem Additional options to pass to the solr binary at startup.
rem
rem SOLR_ADDITIONAL_JVM_OPTIONS rem SOLR_ADDITIONAL_JVM_OPTIONS
rem Additional options to pass to the JVM when launching Solr. rem Additional options to pass to the JVM when launching Solr.
...@@ -38,7 +41,7 @@ if "!%1!"=="!!" goto usage ...@@ -38,7 +41,7 @@ if "!%1!"=="!!" goto usage
rem Set VUFIND_HOME (if not already set) rem Set VUFIND_HOME (if not already set)
if not "!%VUFIND_HOME%!"=="!!" goto vufindhomefound if not "!%VUFIND_HOME%!"=="!!" goto vufindhomefound
rem VUFIND_HOME not set -- try to call env.bat to rem VUFIND_HOME not set -- try to call env.bat to
rem fix the problem before we give up completely rem fix the problem before we give up completely
if exist env.bat goto useenvbat if exist env.bat goto useenvbat
rem If env.bat doesn't exist, the user hasn't run the installer yet. rem If env.bat doesn't exist, the user hasn't run the installer yet.
...@@ -77,7 +80,7 @@ if not "!%SOLR_PORT%!"=="!!" goto solrportset ...@@ -77,7 +80,7 @@ if not "!%SOLR_PORT%!"=="!!" goto solrportset
set SOLR_PORT=8080 set SOLR_PORT=8080
:solrportset :solrportset
call %SOLR_BIN%\solr.cmd %1 -p %SOLR_PORT% -s %SOLR_HOME% -m %SOLR_HEAP% -a "-Dsolr.log=%SOLR_LOGS_DIR% %SOLR_ADDITIONAL_JVM_OPTIONS%" call %SOLR_BIN%\solr.cmd %1 %SOLR_ADDITIONAL_START_OPTIONS% -p %SOLR_PORT% -s %SOLR_HOME% -m %SOLR_HEAP% -a "-Dsolr.log=%SOLR_LOGS_DIR% %SOLR_ADDITIONAL_JVM_OPTIONS%"
goto end goto end
:usage :usage
......
...@@ -23,6 +23,9 @@ ...@@ -23,6 +23,9 @@
# Home of Java installation (not directly used by this script, but passed along to # Home of Java installation (not directly used by this script, but passed along to
# the standard Solr control script). # the standard Solr control script).
# #
# SOLR_ADDITIONAL_START_OPTIONS
# Additional options to pass to the solr binary at startup.
#
# SOLR_ADDITIONAL_JVM_OPTIONS # SOLR_ADDITIONAL_JVM_OPTIONS
# Additional options to pass to the JVM when launching Solr. # Additional options to pass to the JVM when launching Solr.
# #
...@@ -67,10 +70,15 @@ then ...@@ -67,10 +70,15 @@ then
SOLR_PORT="8080" SOLR_PORT="8080"
fi fi
if [ -z "$SOLR_ADDITIONAL_START_OPTIONS" ]
then
SOLR_ADDITIONAL_START_OPTIONS=""
fi
if [ -z "$SOLR_ADDITIONAL_JVM_OPTIONS" ] if [ -z "$SOLR_ADDITIONAL_JVM_OPTIONS" ]
then then
SOLR_ADDITIONAL_JVM_OPTIONS="" SOLR_ADDITIONAL_JVM_OPTIONS=""
fi fi
export SOLR_LOGS_DIR=$SOLR_LOGS_DIR export SOLR_LOGS_DIR=$SOLR_LOGS_DIR
"$SOLR_BIN/solr" "$1" -p "$SOLR_PORT" -s "$SOLR_HOME" -m "$SOLR_HEAP" -a "-Dsolr.log=$SOLR_LOGS_DIR $SOLR_ADDITIONAL_JVM_OPTIONS" "$SOLR_BIN/solr" "$1" ${SOLR_ADDITIONAL_START_OPTIONS} -p "$SOLR_PORT" -s "$SOLR_HOME" -m "$SOLR_HEAP" -a "-Dsolr.log=$SOLR_LOGS_DIR $SOLR_ADDITIONAL_JVM_OPTIONS"
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment