25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-24 16:23:40 +01:00

When building OTP release with mix, keep ERLANG_NODE=ejabberd@localhost

This updates the mix.exs code from commit 8ca12d4 (ejabberd 21.07)
Consequently, no need in make-binaries to update ERLANG_NODE.
The ecs docker image 23.04 got a similar change in
  f81905d5e3
This commit is contained in:
Badlop 2023-08-28 12:30:09 +02:00
parent 40333066d6
commit 2a6ea79260
2 changed files with 1 additions and 3 deletions

View File

@ -271,8 +271,7 @@ defmodule Ejabberd.MixProject do
Mix.Generator.copy_template("ejabberdctl.example1", "ejabberdctl.example2", assigns)
execute.("sed -e 's|{{\\(\[_a-z\]*\\)}}|<%= @\\1 %>|g' ejabberdctl.example2> ejabberdctl.example2a")
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|^ERLANG_NODE=ejabberd@localhost|ERLANG_NODE=ejabberd|g' ejabberdctl.example3 > ejabberdctl.example4")
execute.("sed -e 's|{{\\(\[_a-z\]*\\)}}|<%= @\\1 %>|g' ejabberdctl.example2b > 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|^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)

View File

@ -409,7 +409,6 @@ edit_ejabberdctl()
sed -i \
-e "2iexport TERM='internal'" \
-e '/ERL_OPTIONS=/d' \
-e 's|^ERLANG_NODE=ejabberd$|ERLANG_NODE=ejabberd@localhost|' \
-e 's|_DIR:=".*}/|_DIR:="/opt/ejabberd/|' \
-e 's|/database|/database/$ERLANG_NODE|' \
"$code_dir/bin/${rel_name}ctl"