mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-20 16:15:59 +01:00
When building OTP release with mix, keep ERLANG_NODE=ejabberd@localhost
This updates the mix.exs code from commit8ca12d4
(ejabberd 21.07) Consequently, no need in make-binaries to update ERLANG_NODE. The ecs docker image 23.04 got a similar change inf81905d5e3
This commit is contained in:
parent
40333066d6
commit
2a6ea79260
3
mix.exs
3
mix.exs
@ -271,8 +271,7 @@ defmodule Ejabberd.MixProject do
|
|||||||
Mix.Generator.copy_template("ejabberdctl.example1", "ejabberdctl.example2", assigns)
|
Mix.Generator.copy_template("ejabberdctl.example1", "ejabberdctl.example2", assigns)
|
||||||
execute.("sed -e 's|{{\\(\[_a-z\]*\\)}}|<%= @\\1 %>|g' ejabberdctl.example2> ejabberdctl.example2a")
|
execute.("sed -e 's|{{\\(\[_a-z\]*\\)}}|<%= @\\1 %>|g' ejabberdctl.example2> ejabberdctl.example2a")
|
||||||
Mix.Generator.copy_template("ejabberdctl.example2a", "ejabberdctl.example2b", assigns)
|
Mix.Generator.copy_template("ejabberdctl.example2a", "ejabberdctl.example2b", assigns)
|
||||||
execute.("sed -e 's|{{\\(\[_a-z\]*\\)}}|<%= @\\1 %>|g' ejabberdctl.example2b > ejabberdctl.example3")
|
execute.("sed -e 's|{{\\(\[_a-z\]*\\)}}|<%= @\\1 %>|g' ejabberdctl.example2b > ejabberdctl.example4")
|
||||||
execute.("sed -e 's|^ERLANG_NODE=ejabberd@localhost|ERLANG_NODE=ejabberd|g' ejabberdctl.example3 > ejabberdctl.example4")
|
|
||||||
execute.("sed -e 's|^ERLANG_OPTS=\"|ERLANG_OPTS=\"-boot ../releases/#{release.version}/start_clean -boot_var RELEASE_LIB ../lib |' ejabberdctl.example4 > ejabberdctl.example5")
|
execute.("sed -e 's|^ERLANG_OPTS=\"|ERLANG_OPTS=\"-boot ../releases/#{release.version}/start_clean -boot_var RELEASE_LIB ../lib |' ejabberdctl.example4 > ejabberdctl.example5")
|
||||||
execute.("sed -e 's|^INSTALLUSER=|ERL_OPTIONS=\"-setcookie \\$\\(cat \"\\${SCRIPT_DIR%/*}/releases/COOKIE\")\"\\nINSTALLUSER=|g' ejabberdctl.example5 > ejabberdctl.example6")
|
execute.("sed -e 's|^INSTALLUSER=|ERL_OPTIONS=\"-setcookie \\$\\(cat \"\\${SCRIPT_DIR%/*}/releases/COOKIE\")\"\\nINSTALLUSER=|g' ejabberdctl.example5 > ejabberdctl.example6")
|
||||||
Mix.Generator.copy_template("ejabberdctl.example6", "#{ro}/bin/ejabberdctl", assigns)
|
Mix.Generator.copy_template("ejabberdctl.example6", "#{ro}/bin/ejabberdctl", assigns)
|
||||||
|
@ -409,7 +409,6 @@ edit_ejabberdctl()
|
|||||||
sed -i \
|
sed -i \
|
||||||
-e "2iexport TERM='internal'" \
|
-e "2iexport TERM='internal'" \
|
||||||
-e '/ERL_OPTIONS=/d' \
|
-e '/ERL_OPTIONS=/d' \
|
||||||
-e 's|^ERLANG_NODE=ejabberd$|ERLANG_NODE=ejabberd@localhost|' \
|
|
||||||
-e 's|_DIR:=".*}/|_DIR:="/opt/ejabberd/|' \
|
-e 's|_DIR:=".*}/|_DIR:="/opt/ejabberd/|' \
|
||||||
-e 's|/database|/database/$ERLANG_NODE|' \
|
-e 's|/database|/database/$ERLANG_NODE|' \
|
||||||
"$code_dir/bin/${rel_name}ctl"
|
"$code_dir/bin/${rel_name}ctl"
|
||||||
|
Loading…
Reference in New Issue
Block a user