mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-24 16:23:40 +01:00
ejabberdctl: Detect problem running iex and show explanation
This commit is contained in:
parent
abf07966be
commit
35b727ac39
@ -202,6 +202,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 ""
|
||||||
@ -331,10 +349,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}
|
||||||
|
Loading…
Reference in New Issue
Block a user