File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -76,7 +76,8 @@ if not exist "!ERLANG_SERVICE_MANAGER_PATH!\erlsrv.exe" (
7676)
7777
7878if " !P1! " == " install" goto INSTALL_SERVICE
79- for %%i in (start stop disable enable list remove) do if " %%i " == " !P1! " goto MODIFY_SERVICE
79+ for %%i in (start stop) do if " %%i " == " !P1! " goto START_STOP_SERVICE
80+ for %%i in (disable enable list remove) do if " %%i " == " !P1! " goto MODIFY_SERVICE
8081
8182echo .
8283echo *********************
@@ -226,16 +227,27 @@ set ERLANG_SERVICE_ARGUMENTS=!ERLANG_SERVICE_ARGUMENTS:"=\"!
226227if ERRORLEVEL 1 (
227228 EXIT /B 1
228229)
229-
230230goto END
231231
232232
233233:MODIFY_SERVICE
234234
235235" !ERLANG_SERVICE_MANAGER_PATH! \erlsrv" !P1! !RABBITMQ_SERVICENAME!
236+ if ERRORLEVEL 1 (
237+ EXIT /B 1
238+ )
236239goto END
237240
238241
242+ :START_STOP_SERVICE
243+
244+ REM start and stop via erlsrv reports no error message. Using net instead
245+ net !P1! !RABBITMQ_SERVICENAME!
246+ if ERRORLEVEL 1 (
247+ EXIT /B 1
248+ )
249+ goto END
250+
239251:END
240252
241253EXIT /B 0
You can’t perform that action at this time.
0 commit comments