summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packaging/windows-exe/rabbitmq_nsi.in9
-rw-r--r--scripts/rabbitmq-service.bat6
2 files changed, 6 insertions, 9 deletions
diff --git a/packaging/windows-exe/rabbitmq_nsi.in b/packaging/windows-exe/rabbitmq_nsi.in
index d75c394660..e66d2a99ed 100644
--- a/packaging/windows-exe/rabbitmq_nsi.in
+++ b/packaging/windows-exe/rabbitmq_nsi.in
@@ -140,15 +140,6 @@ Section "RabbitMQ Server (required)" Rabbit
; ...And put the example config file there
File "rabbitmq_server-%%VERSION%%\etc\rabbitmq.config.example"
- IfFileExists rabbitmq.config 0 +2
- Goto config_written
- ClearErrors
- FileOpen $0 rabbitmq.config w
- IfErrors config_written
- FileWrite $0 "[]."
- FileClose $0
- config_written:
-
; Write the installation path into the registry
WriteRegStr HKLM "SOFTWARE\VMware, Inc.\RabbitMQ Server" "Install_Dir" "$INSTDIR"
diff --git a/scripts/rabbitmq-service.bat b/scripts/rabbitmq-service.bat
index 59425540e6..fa871648a3 100644
--- a/scripts/rabbitmq-service.bat
+++ b/scripts/rabbitmq-service.bat
@@ -131,6 +131,12 @@ if ERRORLEVEL 3 (
set RABBITMQ_DIST_ARG=-kernel inet_dist_listen_min !RABBITMQ_DIST_PORT! -kernel inet_dist_listen_max !RABBITMQ_DIST_PORT!
)
+ REM Try to create config file, if it doesn't exist
+ REM It still can fail to be created, but at least not for default install
+if not exist "!RABBITMQ_CONFIG_FILE!.config"(
+ echo []. > !RABBITMQ_CONFIG_FILE!.config
+)
+
if exist "!RABBITMQ_CONFIG_FILE!.config" (
set RABBITMQ_CONFIG_ARG=-config "!RABBITMQ_CONFIG_FILE!"
) else (