Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/processone/ejabberd.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xejabberdctl.template9
1 files changed, 8 insertions, 1 deletions
diff --git a/ejabberdctl.template b/ejabberdctl.template
index 3f74da695..dca23fe81 100755
--- a/ejabberdctl.template
+++ b/ejabberdctl.template
@@ -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'\"'\"')])' \