aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe Romain <cromain@users.noreply.github.com>2017-09-18 13:09:16 +0200
committerGitHub <noreply@github.com>2017-09-18 13:09:16 +0200
commitcb076924ccd08224a5754e4aaa89ae2974e8fe01 (patch)
treedaaf6c29bc88fd1702f981e6219daf89aa68b861
parentFix iexdebug and iexlive commands (#1981) (diff)
parentQuote $PEER in ping command to avoid hostnames containing "-" being interpret... (diff)
Merge pull request #1996 from nosnilmot/ejabberdctl-quote-peer
Quote $PEER in ping command to avoid hostnames containing "-" being interpreted as arithmetic
-rwxr-xr-xejabberdctl.template2
1 files changed, 1 insertions, 1 deletions
diff --git a/ejabberdctl.template b/ejabberdctl.template
index 3f47bbf53..2fa554108 100755
--- a/ejabberdctl.template
+++ b/ejabberdctl.template
@@ -294,7 +294,7 @@ case $1 in
PEER=${2:-$ERLANG_NODE}
[ "$PEER" = "${PEER%.*}" ] && PS="-s"
exec_cmd "$ERL" ${PS:--}name $(uid ping $(hostname $PS)) $ERLANG_OPTS \
- -noinput -hidden -eval 'io:format("~p~n",[net_adm:ping('"$PEER"')])' \
+ -noinput -hidden -eval 'io:format("~p~n",[net_adm:ping('"'$PEER'"')])' \
-s erlang halt -output text
;;
started)