mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-20 16:15:59 +01:00
Extend scope of ejabberdctl ping
This commit is contained in:
parent
f19a54e9a1
commit
939bb244e1
@ -328,8 +328,15 @@ etop()
|
|||||||
ping()
|
ping()
|
||||||
{
|
{
|
||||||
TTY=`tty | sed -e 's/.*\///g'`
|
TTY=`tty | sed -e 's/.*\///g'`
|
||||||
|
if [ "$1" = "${1%.*}" ] ; then
|
||||||
|
PING_NAME="-sname"
|
||||||
|
PING_NODE=$(hostname -s)
|
||||||
|
else
|
||||||
|
PING_NAME="-name"
|
||||||
|
PING_NODE=$(hostname)
|
||||||
|
fi
|
||||||
$EXEC_CMD "$ERL \
|
$EXEC_CMD "$ERL \
|
||||||
$NAME ping-${TTY}-${ERLANG_NODE} \
|
$PING_NAME ping-${TTY}@${PING_NODE} \
|
||||||
-hidden \
|
-hidden \
|
||||||
$KERNEL_OPTS $ERLANG_OPTS \
|
$KERNEL_OPTS $ERLANG_OPTS \
|
||||||
-eval 'io:format(\"~p~n\",[net_adm:ping('\"'\"'$1'\"'\"')])' \
|
-eval 'io:format(\"~p~n\",[net_adm:ping('\"'\"'$1'\"'\"')])' \
|
||||||
|
Loading…
Reference in New Issue
Block a user