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:
authorStu Tomlinson <stu@nosnilmot.com>2017-09-11 17:00:00 +0300
committerStu Tomlinson <stu@nosnilmot.com>2017-09-11 17:00:00 +0300
commit2a7d9d93c88d463df2f5df139350c7da4166f2bd (patch)
treee5e22483ecdf2fe45d432da223d1a4749b609d57 /ejabberdctl.template
parentdfd2045523f5c6814a460692ba902aa08dd62df8 (diff)
Quote $PEER in ping command to avoid hostnames containing "-" being interpreted as arithmetic
Diffstat (limited to 'ejabberdctl.template')
-rwxr-xr-xejabberdctl.template2
1 files changed, 1 insertions, 1 deletions
diff --git a/ejabberdctl.template b/ejabberdctl.template
index 9d47334a2..d2bfa6d2b 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)