diff options
author | Stu Tomlinson <stu@nosnilmot.com> | 2017-09-11 17:00:00 +0300 |
---|---|---|
committer | Stu Tomlinson <stu@nosnilmot.com> | 2017-09-11 17:00:00 +0300 |
commit | 2a7d9d93c88d463df2f5df139350c7da4166f2bd (patch) | |
tree | e5e22483ecdf2fe45d432da223d1a4749b609d57 /ejabberdctl.template | |
parent | dfd2045523f5c6814a460692ba902aa08dd62df8 (diff) |
Quote $PEER in ping command to avoid hostnames containing "-" being interpreted as arithmetic
Diffstat (limited to 'ejabberdctl.template')
-rwxr-xr-x | ejabberdctl.template | 2 |
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) |