25
1
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:
Christophe Romain 2016-03-18 11:08:30 +01:00
parent f19a54e9a1
commit 939bb244e1

View File

@ -328,8 +328,15 @@ etop()
ping()
{
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 \
$NAME ping-${TTY}-${ERLANG_NODE} \
$PING_NAME ping-${TTY}@${PING_NODE} \
-hidden \
$KERNEL_OPTS $ERLANG_OPTS \
-eval 'io:format(\"~p~n\",[net_adm:ping('\"'\"'$1'\"'\"')])' \