Skip to content

Commit

Permalink
Merge pull request #9269 from rabbitmq/rabbitmq-server-9258
Browse files Browse the repository at this point in the history
Allow several env variables to be set in rabbitmq-env-conf.bat
  • Loading branch information
michaelklishin authored Sep 5, 2023
2 parents 808112a + 057f946 commit 65de71e
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 7 deletions.
25 changes: 18 additions & 7 deletions deps/rabbit/scripts/rabbitmq-env.bat
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,24 @@ if "!RABBITMQ_BOOT_MODULE!"=="" (
)
)

if "!RABBITMQ_CONFIG_FILE!"=="" (
if not "!CONFIG_FILE!"=="" (
set RABBITMQ_CONFIG_FILE=!CONFIG_FILE!
)
)

if "!RABBITMQ_LOG_BASE!"=="" (
if not "!LOG_BASE!"=="" (
set RABBITMQ_LOG_BASE=!LOG_BASE!
)
)

if "!RABBITMQ_MNESIA_BASE!"=="" (
if not "!MNESIA_BASE!"=="" (
set RABBITMQ_MNESIA_BASE=!MNESIA_BASE!
)
)

REM [ "x" = "x$RABBITMQ_CTL_ERL_ARGS" ] && RABBITMQ_CTL_ERL_ARGS=${CTL_ERL_ARGS}
if "!RABBITMQ_CTL_ERL_ARGS!"=="" (
if not "!CTL_ERL_ARGS!"=="" (
Expand Down Expand Up @@ -164,13 +182,6 @@ if "!RABBITMQ_SERVICENAME!"=="" (
)

REM Environment cleanup
set BOOT_MODULE=
set CONFIG_FILE=
set FEATURE_FLAGS_FILE=
set ENABLED_PLUGINS_FILE=
set LOG_BASE=
set MNESIA_BASE=
set PLUGINS_DIR=
set SCRIPT_DIR=
set SCRIPT_NAME=
set TDP0=
Expand Down
3 changes: 3 additions & 0 deletions deps/rabbit/scripts/rabbitmq-service.bat
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,9 @@ rem user-specific directory.
-env ERL_MAX_ETS_TABLES="!ERL_MAX_ETS_TABLES!" ^
-env ERL_MAX_PORTS="!ERL_MAX_PORTS!" ^
-env RABBITMQ_BASE="!RABBITMQ_BASE!" ^
-env RABBITMQ_CONFIG_FILE="!RABBITMQ_CONFIG_FILE!" ^
-env RABBITMQ_LOG_BASE="!RABBITMQ_LOG_BASE!" ^
-env RABBITMQ_MNESIA_BASE="!RABBITMQ_MNESIA_BASE!" ^
-env RABBITMQ_NODENAME="!RABBITMQ_NODENAME!" ^
-workdir "!RABBITMQ_BASE!" ^
-stopaction "rabbit:stop_and_halt()." ^
Expand Down

0 comments on commit 65de71e

Please sign in to comment.