fix(emqx.cmd): write_ini should be done before invoking Erlang
Otherwise erl.exe may turn to C:\System Files to load dll modules
This commit is contained in:
parent
78adeea297
commit
c56fbb0d5d
16
bin/emqx.cmd
16
bin/emqx.cmd
|
@ -67,6 +67,14 @@
|
||||||
@set EMQX_NODE__DB_BACKEND=mnesia
|
@set EMQX_NODE__DB_BACKEND=mnesia
|
||||||
@set EMQX_NODE__DB_ROLE=core
|
@set EMQX_NODE__DB_ROLE=core
|
||||||
|
|
||||||
|
:: Write the erl.ini file to set up paths relative to this script
|
||||||
|
@call :write_ini
|
||||||
|
|
||||||
|
:: If a start.boot file is not present, copy one from the named .boot file
|
||||||
|
@if not exist "%rel_dir%\start.boot" (
|
||||||
|
copy "%rel_dir%\%rel_name%.boot" "%rel_dir%\start.boot" >nul
|
||||||
|
)
|
||||||
|
|
||||||
@set conf_path="%etc_dir%\emqx.conf"
|
@set conf_path="%etc_dir%\emqx.conf"
|
||||||
|
|
||||||
@for /f "usebackq tokens=1,2 delims==" %%a in (`"%escript% %nodetool% hocon -s %schema_mod% -c %conf_path% multi_get node.name node.cookie node.data_dir"`) do @(
|
@for /f "usebackq tokens=1,2 delims==" %%a in (`"%escript% %nodetool% hocon -s %schema_mod% -c %conf_path% multi_get node.name node.cookie node.data_dir"`) do @(
|
||||||
|
@ -91,14 +99,6 @@
|
||||||
@goto :eof
|
@goto :eof
|
||||||
)
|
)
|
||||||
|
|
||||||
:: Write the erl.ini file to set up paths relative to this script
|
|
||||||
@call :write_ini
|
|
||||||
|
|
||||||
:: If a start.boot file is not present, copy one from the named .boot file
|
|
||||||
@if not exist "%rel_dir%\start.boot" (
|
|
||||||
copy "%rel_dir%\%rel_name%.boot" "%rel_dir%\start.boot" >nul
|
|
||||||
)
|
|
||||||
|
|
||||||
@if "%1"=="install" @goto install
|
@if "%1"=="install" @goto install
|
||||||
@if "%1"=="uninstall" @goto uninstall
|
@if "%1"=="uninstall" @goto uninstall
|
||||||
@if "%1"=="start" @goto start
|
@if "%1"=="start" @goto start
|
||||||
|
|
Loading…
Reference in New Issue