diff --git a/ejabberdctl.template b/ejabberdctl.template index 6924a8703..eb16e3839 100755 --- a/ejabberdctl.template +++ b/ejabberdctl.template @@ -202,6 +202,24 @@ check_etop_result() fi } +check_iex_result() +{ + result=$? + if [ $result -eq 127 ] ; then + echo "" + echo "It seems there was some problem finding 'iex' binary from Elixir." + echo "Probably ejabberd was compiled with Rebar3 and Elixir disabled, like:" + echo " ./configure" + echo "which is equivalent to:" + echo " ./configure --with-rebar=rebar3 --disable-elixir" + echo "To use 'iex', recompile ejabberd enabling Elixir or using Mix:" + echo " ./configure --enable-elixir" + echo " ./configure --with-rebar=mix" + echo "" + exit $result + fi +} + help() { echo "" @@ -331,10 +349,12 @@ case $1 in debugwarning set_dist_client exec_iex "$(uid debug)" --remsh "$ERLANG_NODE" + check_iex_result ;; iexlive) livewarning exec_iex "$ERLANG_NODE" --erl "$EJABBERD_OPTS" + check_iex_result ;; ping) PEER=${2:-$ERLANG_NODE}