25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-20 17:27:00 +01:00

Mix: Set the nodename when using the ejabberd script generated by Elixir

Also use start instead of console in Elixir script
This commit is contained in:
Badlop 2023-12-19 22:45:13 +01:00
parent 6d61e3590d
commit 30df1dbe3f
3 changed files with 12 additions and 3 deletions

View File

@ -320,7 +320,7 @@ defmodule Ejabberd.MixProject do
end
case Mix.env() do
:dev -> execute.("REL_DIR_TEMP=$PWD/rel/overlays/ rel/setup-dev.sh")
:dev -> execute.("REL_DIR_TEMP=$PWD/rel/overlays/ rel/setup-dev.sh mix")
_ -> :ok
end

View File

@ -268,7 +268,7 @@
{overlay, [{copy, "sql/*", "lib/ejabberd-\{\{release_version\}\}/priv/sql/"},
{copy, "ejabberdctl.cfg.example", "conf/ejabberdctl.cfg"},
{copy, "ejabberd.yml.example", "conf/ejabberd.yml"}]}]}]},
{dev, [{post_hooks, [{release, "rel/setup-dev.sh"}]},
{dev, [{post_hooks, [{release, "rel/setup-dev.sh rebar3"}]},
{relx, [{debug_info, keep},
{dev_mode, true},
{include_erts, true},

View File

@ -23,5 +23,14 @@ sed -i "s|#' POLL|EJABBERD_BYPASS_WARNINGS=true\n\n#' POLL|g" ejabberdctl.cfg.ex
echo ""
echo "===> Some example ways to start this ejabberd dev:"
echo " _build/dev/rel/ejabberd/bin/ejabberd console"
echo " _build/dev/rel/ejabberd/bin/ejabberdctl live"
case "$1" in
"rebar3")
echo " _build/dev/rel/ejabberd/bin/ejabberd console"
;;
"mix")
echo " RELEASE_NODE=ejabberd@localhost _build/dev/rel/ejabberd/bin/ejabberd start"
;;
"*")
;;
esac