Skip to content

Commit

Permalink
Merge pull request #3698 from esl/mongooseimctl-fix
Browse files Browse the repository at this point in the history
Use 'erlexec' directly to avoid overwriting the 'erl' executable
  • Loading branch information
Premwoik committed Jun 29, 2022
2 parents b24cd49 + f96cb77 commit ad9d534
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 37 deletions.
1 change: 0 additions & 1 deletion rebar.config
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@
{copy, "tools/ssl/mongooseim/dh_server.pem", "priv/ssl/fake_dh_server.pem"},
{copy, "tools/ssl/ca/cacert.pem", "priv/ssl/cacert.pem"},

{copy, "rel/files/erl", "erts-\{\{erts_vsn\}\}/bin/erl"},
%% Copy the whole directory scripts into scripts.
%% Still works, if the destination "scripts/" directory exists.
{copy, "rel/files/scripts", "./"},
Expand Down
34 changes: 0 additions & 34 deletions rel/files/erl

This file was deleted.

6 changes: 4 additions & 2 deletions rel/files/mongooseimctl
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ MIM_DIR="${RUNNER_SCRIPT_DIR%/*}"
EJABBERD_VMARGS_PATH="${RUNNER_ETC_DIR}"/vm.args
START_ERL=`cat "$MIM_DIR"/releases/start_erl.data`
ERTS_VSN="${START_ERL% *}"
APP_VSN="${START_ERL#* }"
ERTS_PATH="$MIM_DIR/erts-$ERTS_VSN/bin"
ERL="$ERTS_PATH"/erl
EPMD="$ERTS_PATH"/epmd
SCRIPTS_DIR="$MIM_DIR"/scripts

Expand Down Expand Up @@ -264,9 +264,11 @@ ctl ()

ctlexec ()
{
export BINDIR=$ERTS_PATH
CONN_NAME=$1; shift
COMMAND=$@
"$ERL" \
$ERTS_PATH/erlexec \
-boot "$MIM_DIR/releases/$APP_VSN/start_clean" \
$NAME_TYPE ${CONN_NAME} \
-noinput \
-hidden \
Expand Down

0 comments on commit ad9d534

Please sign in to comment.