diff options
| author | Jakauppila <Jared@Kauppi.la> | 2015-06-23 22:42:49 -0500 |
|---|---|---|
| committer | Jakauppila <Jared@Kauppi.la> | 2015-06-23 22:51:43 -0500 |
| commit | 2b89dbe8b0ab70cd42f4514a8f4920768feef5f8 (patch) | |
| tree | 484603f6be4615f425460dc38f089106ac665475 /scripts/rabbitmqctl.bat | |
| parent | 789419af0fc7f08c2f44a26bf81ca5d4c104df5f (diff) | |
| download | rabbitmq-server-git-2b89dbe8b0ab70cd42f4514a8f4920768feef5f8.tar.gz | |
Windows batch file changes to support -env, -defaults, and -conf functionality present on *nix
Mimicked the behavior of the -env, -defaults, and -conf scripts
available on *nix
Diffstat (limited to 'scripts/rabbitmqctl.bat')
| -rwxr-xr-x | scripts/rabbitmqctl.bat | 42 |
1 files changed, 6 insertions, 36 deletions
diff --git a/scripts/rabbitmqctl.bat b/scripts/rabbitmqctl.bat index 54590cdde7..3947ee3e90 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-2014 GoPivotal, 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,42 +24,11 @@ set TDP0=%~dp0 set STAR=%*
setlocal enabledelayedexpansion
-if exist "%RABBITMQ_BASE%\rabbitmq-env.bat" (
- call "%RABBITMQ_BASE%\rabbitmq-env.bat"
-)
-
-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 ^
@@ -71,4 +41,4 @@ if not exist "!ERLANG_HOME!\bin\erl.exe" ( -extra !STAR!
endlocal
-endlocal
+endlocal
\ No newline at end of file |
