25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-20 16:15:59 +01:00

Container: Apply commit 35b727a

ejabberdctl: Detect problem running iex and show explanation
This commit is contained in:
Badlop 2024-02-09 11:10:48 +01:00
parent 2531ebf685
commit e1b94487ef

View File

@ -215,6 +215,24 @@ check_etop_result()
fi 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() help()
{ {
echo "" echo ""
@ -392,10 +410,12 @@ case $1 in
debugwarning debugwarning
set_dist_client set_dist_client
exec_iex "$(uid debug)" --remsh "$ERLANG_NODE" exec_iex "$(uid debug)" --remsh "$ERLANG_NODE"
check_iex_result
;; ;;
iexlive) iexlive)
livewarning livewarning
exec_iex "$ERLANG_NODE" --erl "$EJABBERD_OPTS" exec_iex "$ERLANG_NODE" --erl "$EJABBERD_OPTS"
check_iex_result
;; ;;
ping) ping)
PEER=${2:-$ERLANG_NODE} PEER=${2:-$ERLANG_NODE}