summaryrefslogtreecommitdiff
path: root/priv/templates/simplenode.windows.runner.cmd
diff options
context:
space:
mode:
authorDave Smith <dizzyd@dizzyd.com>2013-06-12 06:17:21 -0700
committerDave Smith <dizzyd@dizzyd.com>2013-06-12 06:17:21 -0700
commite792a6426fa4600ecd9c8c85ab00e469ab5e29de (patch)
treed4a93566c1f25f3f4450461de06bb71738b13ede /priv/templates/simplenode.windows.runner.cmd
parent638569acc2a2947e0e2d8d159b1f8ff9e261a551 (diff)
parent89c8f931a554dd82df4829f867e7fa15199ca2a4 (diff)
Merge pull request #91 from syl20bnr/ping-command-for-windows
Add support for ping command on windows in the simple node runner
Diffstat (limited to 'priv/templates/simplenode.windows.runner.cmd')
-rw-r--r--priv/templates/simplenode.windows.runner.cmd9
1 files changed, 8 insertions, 1 deletions
diff --git a/priv/templates/simplenode.windows.runner.cmd b/priv/templates/simplenode.windows.runner.cmd
index 16da5b9..d45f438 100644
--- a/priv/templates/simplenode.windows.runner.cmd
+++ b/priv/templates/simplenode.windows.runner.cmd
@@ -30,6 +30,7 @@
@set epmd="%erts_bin%\epmd.exe"
@set escript="%erts_bin%\escript.exe"
@set werl="%erts_bin%\werl.exe"
+@set nodetool="%erts_bin%\nodetool"
@if "%1"=="usage" @goto usage
@if "%1"=="install" @goto install
@@ -38,13 +39,14 @@
@if "%1"=="stop" @goto stop
@if "%1"=="restart" @call :stop && @goto start
@if "%1"=="console" @goto console
+@if "%1"=="ping" @goto ping
@if "%1"=="query" @goto query
@if "%1"=="attach" @goto attach
@if "%1"=="upgrade" @goto upgrade
@echo Unknown command: "%1"
: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
:install
@@ -71,6 +73,11 @@
@start "%node_name% console" %werl% -boot "%node_boot_script%" -config "%sys_config%" -args_file "%vm_args%" -sname %node_name%
@goto :EOF
+:ping
+@%escript% %nodetool% ping -sname "%node_name%" -setcookie "%erlang_cookie%"
+@exit %ERRORLEVEL%
+@goto :EOF
+
:query
@%erlsrv% list %service_name%
@exit %ERRORLEVEL%