summaryrefslogtreecommitdiff
path: root/scripts/rabbitmq-plugins.bat
diff options
context:
space:
mode:
authorSimon MacMullen <simon@rabbitmq.com>2014-10-17 14:40:39 +0100
committerSimon MacMullen <simon@rabbitmq.com>2014-10-17 14:40:39 +0100
commit1780ff7927707c6424d857833b1931259b914901 (patch)
tree863fdba36bd64d26ca638fe12579bc77525c03ca /scripts/rabbitmq-plugins.bat
parent383a64375102048030863b00dbc6e19253f75e6d (diff)
downloadrabbitmq-server-git-1780ff7927707c6424d857833b1931259b914901.tar.gz
Add RABBITMQ_USE_LONGNAME. Based on a patch from Marcos Diez but with fixes for the new way rabbitmqctl starts distribution, refactoring of common stuff into rabbitmq-env, not trimming the hostname, etc.
Diffstat (limited to 'scripts/rabbitmq-plugins.bat')
-rwxr-xr-xscripts/rabbitmq-plugins.bat10
1 files changed, 9 insertions, 1 deletions
diff --git a/scripts/rabbitmq-plugins.bat b/scripts/rabbitmq-plugins.bat
index 61e39e3885..1fc0e7338a 100755
--- a/scripts/rabbitmq-plugins.bat
+++ b/scripts/rabbitmq-plugins.bat
@@ -23,6 +23,14 @@ set TDP0=%~dp0
set STAR=%*
setlocal enabledelayedexpansion
+if "!RABBITMQ_USE_LONGNAME!"=="" (
+ set RABBITMQ_NAME_TYPE="-sname"
+)
+
+if "!RABBITMQ_USE_LONGNAME!"=="true" (
+ set RABBITMQ_NAME_TYPE="-name"
+)
+
if "!RABBITMQ_SERVICENAME!"=="" (
set RABBITMQ_SERVICENAME=RabbitMQ
)
@@ -55,7 +63,7 @@ if "!RABBITMQ_PLUGINS_DIR!"=="" (
set RABBITMQ_PLUGINS_DIR=!TDP0!..\plugins
)
-"!ERLANG_HOME!\bin\erl.exe" -pa "!TDP0!..\ebin" -noinput -hidden -sname rabbitmq-plugins!RANDOM!!TIME:~9! -s rabbit_plugins_main -enabled_plugins_file "!RABBITMQ_ENABLED_PLUGINS_FILE!" -plugins_dist_dir "!RABBITMQ_PLUGINS_DIR:\=/!" -nodename !RABBITMQ_NODENAME! -extra !STAR!
+"!ERLANG_HOME!\bin\erl.exe" -pa "!TDP0!..\ebin" -noinput -hidden %RABBITMQ_NAME_TYPE% rabbitmq-plugins!RANDOM!!TIME:~9! -s rabbit_plugins_main -enabled_plugins_file "!RABBITMQ_ENABLED_PLUGINS_FILE!" -plugins_dist_dir "!RABBITMQ_PLUGINS_DIR:\=/!" -nodename !RABBITMQ_NODENAME! -extra !STAR!
endlocal
endlocal