diff --git a/solr.bat b/solr.bat index f61c08a86f2be19aeb2ce452b5ef9c322b067f43..e4a16c9174909f93fce0b051bcae6e5f0fc121a9 100644 --- a/solr.bat +++ b/solr.bat @@ -22,6 +22,9 @@ rem JAVA_HOME rem Home of Java installation (not directly used by this script, but passed along to rem the standard Solr control script). rem +rem SOLR_ADDITIONAL_START_OPTIONS +rem Additional options to pass to the solr binary at startup. +rem rem SOLR_ADDITIONAL_JVM_OPTIONS rem Additional options to pass to the JVM when launching Solr. @@ -38,7 +41,7 @@ if "!%1!"=="!!" goto usage rem Set VUFIND_HOME (if not already set) 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 if exist env.bat goto useenvbat 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 set SOLR_PORT=8080 :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 :usage diff --git a/solr.sh b/solr.sh index d9b33a82158bae7595ca046a929ef93db7309feb..49fe26e9a28b8f30ba3be88c4edc6b8d41913efb 100755 --- a/solr.sh +++ b/solr.sh @@ -23,6 +23,9 @@ # Home of Java installation (not directly used by this script, but passed along to # the standard Solr control script). # +# SOLR_ADDITIONAL_START_OPTIONS +# Additional options to pass to the solr binary at startup. +# # SOLR_ADDITIONAL_JVM_OPTIONS # Additional options to pass to the JVM when launching Solr. # @@ -67,10 +70,15 @@ then SOLR_PORT="8080" fi +if [ -z "$SOLR_ADDITIONAL_START_OPTIONS" ] +then + SOLR_ADDITIONAL_START_OPTIONS="" +fi + if [ -z "$SOLR_ADDITIONAL_JVM_OPTIONS" ] then SOLR_ADDITIONAL_JVM_OPTIONS="" fi 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"