From 14b6f70fb0a9b94b7039e6d4a544c41bac21fd1d Mon Sep 17 00:00:00 2001 From: Matthias Radestock Date: Wed, 28 Oct 2009 13:02:12 +0000 Subject: fix typo --- scripts/rabbitmq-server.bat | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/rabbitmq-server.bat b/scripts/rabbitmq-server.bat index 40f47c4b..200869c3 100755 --- a/scripts/rabbitmq-server.bat +++ b/scripts/rabbitmq-server.bat @@ -77,13 +77,13 @@ set LOGS="%RABBITMQ_BASE%\log\%RABBITMQ_NODENAME%.log" set SASL_LOGS="%RABBITMQ_BASE%\log\%RABBITMQ_NODENAME%-sasl.log" set LOGS_BACKUP="%RABBITMQ_BASE%\log\%RABBITMQ_NODENAME%.log%BACKUP_EXTENSION%" -set SASL_LOGS_BAKCUP="%RABBITMQ_BASE%\log\%RABBITMQ_NODENAME%-sasl.log%BACKUP_EXTENSION%" +set SASL_LOGS_BACKUP="%RABBITMQ_BASE%\log\%RABBITMQ_NODENAME%-sasl.log%BACKUP_EXTENSION%" if exist %LOGS% ( type %LOGS% >> %LOGS_BACKUP% ) if exist %SASL_LOGS% ( - type %SASL_LOGS% >> %SASL_LOGS_BAKCUP% + type %SASL_LOGS% >> %SASL_LOGS_BACKUP% ) rem End of log management -- cgit v1.2.1 From bb4e57c8b18f984ab88d021b06a49a6c829171a3 Mon Sep 17 00:00:00 2001 From: Matthias Radestock Date: Wed, 28 Oct 2009 14:12:58 +0000 Subject: escape env vars in .bat scripts on use rather than definition We did that on most env vars already, except recently introduced ones, which caused nasty quoting bugs. Some cosmetic changes and minor refactoring too. --- scripts/rabbitmq-activate-plugins.bat | 15 +++++++++++---- scripts/rabbitmq-deactivate-plugins.bat | 4 ++-- scripts/rabbitmq-server.bat | 25 +++++++++++++------------ scripts/rabbitmq-service.bat | 14 +++++++------- 4 files changed, 33 insertions(+), 25 deletions(-) (limited to 'scripts') diff --git a/scripts/rabbitmq-activate-plugins.bat b/scripts/rabbitmq-activate-plugins.bat index 3540bf2d..d639ff0e 100644 --- a/scripts/rabbitmq-activate-plugins.bat +++ b/scripts/rabbitmq-activate-plugins.bat @@ -42,8 +42,15 @@ if not exist "%ERLANG_HOME%\bin\erl.exe" ( exit /B ) -set RABBITMQ_PLUGINS_DIR="%~dp0..\plugins" -set RABBITMQ_PLUGINS_EXPAND_DIR="%~dp0..\priv\plugins" -set RABBITMQ_EBIN_DIR="%~dp0..\ebin" +set RABBITMQ_PLUGINS_DIR=%~dp0..\plugins +set RABBITMQ_PLUGINS_EXPAND_DIR=%~dp0..\priv\plugins +set RABBITMQ_EBIN_DIR=%~dp0..\ebin -"%ERLANG_HOME%\bin\erl.exe" -pa "%~dp0..\ebin" -noinput -hidden -s rabbit_plugin_activator -rabbit plugins_dir \"%RABBITMQ_PLUGINS_DIR:\=/%\" -rabbit plugins_expand_dir \"%RABBITMQ_PLUGINS_EXPAND_DIR:\=/%\" -rabbit rabbit_ebin \"%RABBITMQ_EBIN_DIR:\=/%\" -extra %* +"%ERLANG_HOME%\bin\erl.exe" ^ +-pa "%RABBITMQ_EBIN_DIR%" ^ +-noinput -hidden ^ +-s rabbit_plugin_activator ^ +-rabbit plugins_dir \""%RABBITMQ_PLUGINS_DIR:\=/%"\" ^ +-rabbit plugins_expand_dir \""%RABBITMQ_PLUGINS_EXPAND_DIR:\=/%"\" ^ +-rabbit rabbit_ebin \""%RABBITMQ_EBIN_DIR:\=/%"\" ^ +-extra %* diff --git a/scripts/rabbitmq-deactivate-plugins.bat b/scripts/rabbitmq-deactivate-plugins.bat index 190fdef7..6102c763 100644 --- a/scripts/rabbitmq-deactivate-plugins.bat +++ b/scripts/rabbitmq-deactivate-plugins.bat @@ -30,6 +30,6 @@ REM REM Contributor(s): ______________________________________. REM -set RABBITMQ_EBIN_DIR="%~dp0..\ebin" +set RABBITMQ_EBIN_DIR=%~dp0..\ebin -del /f %RABBITMQ_EBIN_DIR%\rabbit.rel %RABBITMQ_EBIN_DIR%\rabbit.script %RABBITMQ_EBIN_DIR%\rabbit.boot +del /f %RABBITMQ_EBIN_DIR%\rabbit.rel "%RABBITMQ_EBIN_DIR%"\rabbit.script "%RABBITMQ_EBIN_DIR%"\rabbit.boot diff --git a/scripts/rabbitmq-server.bat b/scripts/rabbitmq-server.bat index 200869c3..b45a2713 100755 --- a/scripts/rabbitmq-server.bat +++ b/scripts/rabbitmq-server.bat @@ -73,17 +73,17 @@ rem Log management (rotation, filtering based of size...) is left as an exercice set BACKUP_EXTENSION=.1 -set LOGS="%RABBITMQ_BASE%\log\%RABBITMQ_NODENAME%.log" -set SASL_LOGS="%RABBITMQ_BASE%\log\%RABBITMQ_NODENAME%-sasl.log" +set LOGS=%RABBITMQ_BASE%\log\%RABBITMQ_NODENAME%.log +set SASL_LOGS=%RABBITMQ_BASE%\log\%RABBITMQ_NODENAME%-sasl.log -set LOGS_BACKUP="%RABBITMQ_BASE%\log\%RABBITMQ_NODENAME%.log%BACKUP_EXTENSION%" -set SASL_LOGS_BACKUP="%RABBITMQ_BASE%\log\%RABBITMQ_NODENAME%-sasl.log%BACKUP_EXTENSION%" +set LOGS_BACKUP=%RABBITMQ_BASE%\log\%RABBITMQ_NODENAME%.log%BACKUP_EXTENSION% +set SASL_LOGS_BACKUP=%RABBITMQ_BASE%\log\%RABBITMQ_NODENAME%-sasl.log%BACKUP_EXTENSION% -if exist %LOGS% ( - type %LOGS% >> %LOGS_BACKUP% +if exist "%LOGS%" ( + type "%LOGS%" >> "%LOGS_BACKUP%" ) -if exist %SASL_LOGS% ( - type %SASL_LOGS% >> %SASL_LOGS_BACKUP% +if exist "%SASL_LOGS%" ( + type "%SASL_LOGS%" >> "%SASL_LOGS_BACKUP%" ) rem End of log management @@ -103,26 +103,27 @@ if "%RABBITMQ_MNESIA_DIR%"=="" ( set RABBITMQ_EBIN_ROOT=%~dp0..\ebin if exist "%RABBITMQ_EBIN_ROOT%\rabbit.boot" ( echo Using Custom Boot File "%RABBITMQ_EBIN_ROOT%\rabbit.boot" - set RABBITMQ_BOOT_FILE="%RABBITMQ_EBIN_ROOT%\rabbit" + set RABBITMQ_BOOT_FILE=%RABBITMQ_EBIN_ROOT%\rabbit set RABBITMQ_EBIN_PATH= ) else ( set RABBITMQ_BOOT_FILE=start_sasl set RABBITMQ_EBIN_PATH=-pa "%RABBITMQ_EBIN_ROOT%" ) if "%RABBITMQ_CONFIG_FILE%"=="" ( - set RABBITMQ_CONFIG_FILE="%RABBITMQ_BASE%\rabbitmq" + set RABBITMQ_CONFIG_FILE=%RABBITMQ_BASE%\rabbitmq ) if exist "%RABBITMQ_CONFIG_FILE%.config" ( set RABBITMQ_CONFIG_ARG=-config "%RABBITMQ_CONFIG_FILE%" ) else ( - set RABBITMQ_CONFIG_ARG="" + set RABBITMQ_CONFIG_ARG= ) "%ERLANG_HOME%\bin\erl.exe" ^ %RABBITMQ_EBIN_PATH% ^ -noinput ^ --boot %RABBITMQ_BOOT_FILE% %RABBITMQ_CONFIG_ARG% ^ +-boot "%RABBITMQ_BOOT_FILE%" ^ +%RABBITMQ_CONFIG_ARG% ^ -sname %RABBITMQ_NODENAME% ^ -s rabbit ^ +W w ^ diff --git a/scripts/rabbitmq-service.bat b/scripts/rabbitmq-service.bat index 29be1742..3a30ea26 100755 --- a/scripts/rabbitmq-service.bat +++ b/scripts/rabbitmq-service.bat @@ -91,17 +91,17 @@ rem Log management (rotation, filtering based on size...) is left as an exercise set BACKUP_EXTENSION=.1 -set LOGS="%RABBITMQ_BASE%\log\%RABBITMQ_NODENAME%.log" -set SASL_LOGS="%RABBITMQ_BASE%\log\%RABBITMQ_NODENAME%-sasl.log" +set LOGS=%RABBITMQ_BASE%\log\%RABBITMQ_NODENAME%.log +set SASL_LOGS=%RABBITMQ_BASE%\log\%RABBITMQ_NODENAME%-sasl.log -set LOGS_BACKUP="%RABBITMQ_BASE%\log\%RABBITMQ_NODENAME%.log%BACKUP_EXTENSION%" -set SASL_LOGS_BACKUP="%RABBITMQ_BASE%\log\%RABBITMQ_NODENAME%-sasl.log%BACKUP_EXTENSION%" +set LOGS_BACKUP=%RABBITMQ_BASE%\log\%RABBITMQ_NODENAME%.log%BACKUP_EXTENSION% +set SASL_LOGS_BACKUP=%RABBITMQ_BASE%\log\%RABBITMQ_NODENAME%-sasl.log%BACKUP_EXTENSION% -if exist %LOGS% ( - type %LOGS% >> %LOGS_BACKUP% +if exist "%LOGS%" ( + type "%LOGS%" >> "%LOGS_BACKUP%" ) if exist %SASL_LOGS% ( - type %SASL_LOGS% >> %SASL_LOGS_BACKUP% + type "%SASL_LOGS%" >> "%SASL_LOGS_BACKUP%" ) rem End of log management -- cgit v1.2.1 From 771898a3f0b9e3315f1ddfda203aeeb7dd171bdb Mon Sep 17 00:00:00 2001 From: Paul Jones Date: Wed, 28 Oct 2009 15:57:28 +0000 Subject: Add missing quoting RABBITMQ_EBIN_PATH on the deletion of rabbit.rel --- scripts/rabbitmq-deactivate-plugins.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/rabbitmq-deactivate-plugins.bat b/scripts/rabbitmq-deactivate-plugins.bat index 6102c763..71e60605 100644 --- a/scripts/rabbitmq-deactivate-plugins.bat +++ b/scripts/rabbitmq-deactivate-plugins.bat @@ -32,4 +32,4 @@ REM set RABBITMQ_EBIN_DIR=%~dp0..\ebin -del /f %RABBITMQ_EBIN_DIR%\rabbit.rel "%RABBITMQ_EBIN_DIR%"\rabbit.script "%RABBITMQ_EBIN_DIR%"\rabbit.boot +del /f "%RABBITMQ_EBIN_DIR%"\rabbit.rel "%RABBITMQ_EBIN_DIR%"\rabbit.script "%RABBITMQ_EBIN_DIR%"\rabbit.boot -- cgit v1.2.1