diff options
Diffstat (limited to 'scripts/rabbitmqctl.bat')
| -rwxr-xr-x | scripts/rabbitmqctl.bat | 38 |
1 files changed, 6 insertions, 32 deletions
diff --git a/scripts/rabbitmqctl.bat b/scripts/rabbitmqctl.bat index 38a00c7c5c..ef9b13c7ae 100755 --- a/scripts/rabbitmqctl.bat +++ b/scripts/rabbitmqctl.bat @@ -15,6 +15,7 @@ REM The Initial Developer of the Original Code is GoPivotal, Inc. REM Copyright (c) 2007-2015 Pivotal Software, Inc. All rights reserved.
REM
+REM Scopes the variables to the current batch file
setlocal
rem Preserve values that might contain exclamation marks before
@@ -23,38 +24,11 @@ set TDP0=%~dp0 set STAR=%*
setlocal enabledelayedexpansion
-if "!RABBITMQ_BASE!"=="" (
- set RABBITMQ_BASE=!APPDATA!\RabbitMQ
-)
-
-if "!COMPUTERNAME!"=="" (
- set COMPUTERNAME=localhost
-)
-
-if "!RABBITMQ_NODENAME!"=="" (
- set RABBITMQ_NODENAME=rabbit@!COMPUTERNAME!
-)
-
-if "!RABBITMQ_MNESIA_BASE!"=="" (
- set RABBITMQ_MNESIA_BASE=!RABBITMQ_BASE!/db
-)
-
-if "!RABBITMQ_MNESIA_DIR!"=="" (
- set RABBITMQ_MNESIA_DIR=!RABBITMQ_MNESIA_BASE!/!RABBITMQ_NODENAME!-mnesia
-)
-
-if not exist "!ERLANG_HOME!\bin\erl.exe" (
- echo.
- echo ******************************
- echo ERLANG_HOME not set correctly.
- echo ******************************
- echo.
- echo Please either set ERLANG_HOME to point to your Erlang installation or place the
- echo RabbitMQ server distribution in the Erlang lib folder.
- echo.
- exit /B 1
-)
+REM Get default settings with user overrides for (RABBITMQ_)<var_name>
+REM Non-empty defaults should be set in rabbitmq-env
+call "%cd%\rabbitmq-env.bat"
+REM Uncomment this later, just for testing now
"!ERLANG_HOME!\bin\erl.exe" ^
-pa "!TDP0!..\ebin" ^
-noinput ^
@@ -67,4 +41,4 @@ if not exist "!ERLANG_HOME!\bin\erl.exe" ( -extra !STAR!
endlocal
-endlocal
+endlocal
\ No newline at end of file |
