mirror of
https://github.com/correl/rebar.git
synced 2024-11-15 11:09:33 +00:00
Merge pull request #91 from syl20bnr/ping-command-for-windows
Add support for ping command on windows in the simple node runner
This commit is contained in:
commit
e792a6426f
2 changed files with 12 additions and 2 deletions
|
@ -20,7 +20,8 @@
|
||||||
{profile, embedded},
|
{profile, embedded},
|
||||||
{incl_cond, derived},
|
{incl_cond, derived},
|
||||||
{excl_archive_filters, [".*"]}, %% Do not archive built libs
|
{excl_archive_filters, [".*"]}, %% Do not archive built libs
|
||||||
{excl_sys_filters, ["^bin/.*", "^erts.*/bin/(dialyzer|typer)",
|
{excl_sys_filters, ["^bin/(?!start_clean.boot)",
|
||||||
|
"^erts.*/bin/(dialyzer|typer)",
|
||||||
"^erts.*/(doc|info|include|lib|man|src)"]},
|
"^erts.*/(doc|info|include|lib|man|src)"]},
|
||||||
{excl_app_filters, ["\.gitignore"]},
|
{excl_app_filters, ["\.gitignore"]},
|
||||||
{app, {{nodeid}}, [{mod_cond, app}, {incl_cond, include}]}
|
{app, {{nodeid}}, [{mod_cond, app}, {incl_cond, include}]}
|
||||||
|
@ -32,6 +33,8 @@
|
||||||
{mkdir, "log/sasl"},
|
{mkdir, "log/sasl"},
|
||||||
{copy, "files/erl", "\{\{erts_vsn\}\}/bin/erl"},
|
{copy, "files/erl", "\{\{erts_vsn\}\}/bin/erl"},
|
||||||
{copy, "files/nodetool", "\{\{erts_vsn\}\}/bin/nodetool"},
|
{copy, "files/nodetool", "\{\{erts_vsn\}\}/bin/nodetool"},
|
||||||
|
{copy, "{{nodeid}}/bin/start_clean.boot",
|
||||||
|
"\{\{erts_vsn\}\}/bin/start_clean.boot"},
|
||||||
{copy, "files/{{nodeid}}", "bin/{{nodeid}}"},
|
{copy, "files/{{nodeid}}", "bin/{{nodeid}}"},
|
||||||
{copy, "files/{{nodeid}}.cmd", "bin/{{nodeid}}.cmd"},
|
{copy, "files/{{nodeid}}.cmd", "bin/{{nodeid}}.cmd"},
|
||||||
{copy, "files/start_erl.cmd", "bin/start_erl.cmd"},
|
{copy, "files/start_erl.cmd", "bin/start_erl.cmd"},
|
||||||
|
|
|
@ -30,6 +30,7 @@
|
||||||
@set epmd="%erts_bin%\epmd.exe"
|
@set epmd="%erts_bin%\epmd.exe"
|
||||||
@set escript="%erts_bin%\escript.exe"
|
@set escript="%erts_bin%\escript.exe"
|
||||||
@set werl="%erts_bin%\werl.exe"
|
@set werl="%erts_bin%\werl.exe"
|
||||||
|
@set nodetool="%erts_bin%\nodetool"
|
||||||
|
|
||||||
@if "%1"=="usage" @goto usage
|
@if "%1"=="usage" @goto usage
|
||||||
@if "%1"=="install" @goto install
|
@if "%1"=="install" @goto install
|
||||||
|
@ -38,13 +39,14 @@
|
||||||
@if "%1"=="stop" @goto stop
|
@if "%1"=="stop" @goto stop
|
||||||
@if "%1"=="restart" @call :stop && @goto start
|
@if "%1"=="restart" @call :stop && @goto start
|
||||||
@if "%1"=="console" @goto console
|
@if "%1"=="console" @goto console
|
||||||
|
@if "%1"=="ping" @goto ping
|
||||||
@if "%1"=="query" @goto query
|
@if "%1"=="query" @goto query
|
||||||
@if "%1"=="attach" @goto attach
|
@if "%1"=="attach" @goto attach
|
||||||
@if "%1"=="upgrade" @goto upgrade
|
@if "%1"=="upgrade" @goto upgrade
|
||||||
@echo Unknown command: "%1"
|
@echo Unknown command: "%1"
|
||||||
|
|
||||||
:usage
|
:usage
|
||||||
@echo Usage: %~n0 [install^|uninstall^|start^|stop^|restart^|console^|query^|attach^|upgrade]
|
@echo Usage: %~n0 [install^|uninstall^|start^|stop^|restart^|console^|ping^|query^|attach^|upgrade]
|
||||||
@goto :EOF
|
@goto :EOF
|
||||||
|
|
||||||
:install
|
:install
|
||||||
|
@ -71,6 +73,11 @@
|
||||||
@start "%node_name% console" %werl% -boot "%node_boot_script%" -config "%sys_config%" -args_file "%vm_args%" -sname %node_name%
|
@start "%node_name% console" %werl% -boot "%node_boot_script%" -config "%sys_config%" -args_file "%vm_args%" -sname %node_name%
|
||||||
@goto :EOF
|
@goto :EOF
|
||||||
|
|
||||||
|
:ping
|
||||||
|
@%escript% %nodetool% ping -sname "%node_name%" -setcookie "%erlang_cookie%"
|
||||||
|
@exit %ERRORLEVEL%
|
||||||
|
@goto :EOF
|
||||||
|
|
||||||
:query
|
:query
|
||||||
@%erlsrv% list %service_name%
|
@%erlsrv% list %service_name%
|
||||||
@exit %ERRORLEVEL%
|
@exit %ERRORLEVEL%
|
||||||
|
|
Loading…
Reference in a new issue