mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-26 17:38:45 +01:00
Fix node ping command
This commit is contained in:
parent
f7d4aae64d
commit
8487b51ecd
@ -327,7 +327,8 @@ etop()
|
|||||||
|
|
||||||
ping()
|
ping()
|
||||||
{
|
{
|
||||||
if [ "$1" = "${1%.*}" ] ; then
|
[ -z "$1" ] && PEER=${ERLANG_NODE} || PEER=$1
|
||||||
|
if [ "$PEER" = "${PEER%.*}" ] ; then
|
||||||
PING_NAME="-sname"
|
PING_NAME="-sname"
|
||||||
PING_NODE=$(hostname -s)
|
PING_NODE=$(hostname -s)
|
||||||
else
|
else
|
||||||
@ -338,7 +339,7 @@ ping()
|
|||||||
$EXEC_CMD "$ERL \
|
$EXEC_CMD "$ERL \
|
||||||
$PING_NAME $NID \
|
$PING_NAME $NID \
|
||||||
-hidden $KERNEL_OPTS $ERLANG_OPTS \
|
-hidden $KERNEL_OPTS $ERLANG_OPTS \
|
||||||
-eval 'io:format(\"~p~n\",[net_adm:ping('\"'\"'$1'\"'\"')])' \
|
-eval 'io:format(\"~p~n\",[net_adm:ping('\"'\"'$PEER'\"'\"')])' \
|
||||||
-s erlang halt -output text -noinput"
|
-s erlang halt -output text -noinput"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -446,7 +447,7 @@ case "${ARGS[0]}" in
|
|||||||
'live') live;;
|
'live') live;;
|
||||||
'iexlive') iexlive;;
|
'iexlive') iexlive;;
|
||||||
'foreground') foreground;;
|
'foreground') foreground;;
|
||||||
'ping'*) ping ${ARGS# ping};;
|
'ping'*) ping ${ARGS[1]};;
|
||||||
'etop') etop;;
|
'etop') etop;;
|
||||||
'started') wait_for_status 0 30 2;; # wait 30x2s before timeout
|
'started') wait_for_status 0 30 2;; # wait 30x2s before timeout
|
||||||
'stopped') wait_for_status 3 15 2 && stop_epmd;; # wait 15x2s before timeout
|
'stopped') wait_for_status 3 15 2 && stop_epmd;; # wait 15x2s before timeout
|
||||||
|
Loading…
Reference in New Issue
Block a user