From a7c3c9b77dd5b687364cecd0bd4b93ed9b4aeaa9 Mon Sep 17 00:00:00 2001 From: Badlop Date: Thu, 24 Aug 2023 17:33:12 +0200 Subject: [PATCH] Pass ERLANG_OPTS when calling erl to parse the INET_DIST_INTERFACE (#4066) This is required when running ejabberdctl in binary installers and INET_DIST_INTERFACE was configured, because some boot files were removed --- .github/container/ejabberdctl.template | 2 +- ejabberdctl.template | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/container/ejabberdctl.template b/.github/container/ejabberdctl.template index a0e2f0573..8407ac5a3 100755 --- a/.github/container/ejabberdctl.template +++ b/.github/container/ejabberdctl.template @@ -77,7 +77,7 @@ if [ -n "$FIREWALL_WINDOW" ] ; then ERLANG_OPTS="$ERLANG_OPTS -kernel inet_dist_listen_min ${FIREWALL_WINDOW%-*} inet_dist_listen_max ${FIREWALL_WINDOW#*-}" fi if [ -n "$INET_DIST_INTERFACE" ] ; then - INET_DIST_INTERFACE2=$("$ERL" -noshell -eval 'case inet:parse_address("'$INET_DIST_INTERFACE'") of {ok,IP} -> io:format("~p",[IP]); _ -> ok end.' -s erlang halt) + INET_DIST_INTERFACE2=$("$ERL" $ERLANG_OPTS -noshell -eval 'case inet:parse_address("'$INET_DIST_INTERFACE'") of {ok,IP} -> io:format("~p",[IP]); _ -> ok end.' -s erlang halt) if [ -n "$INET_DIST_INTERFACE2" ] ; then ERLANG_OPTS="$ERLANG_OPTS -kernel inet_dist_use_interface $INET_DIST_INTERFACE2" fi diff --git a/ejabberdctl.template b/ejabberdctl.template index 4085492ac..f1af26ca1 100755 --- a/ejabberdctl.template +++ b/ejabberdctl.template @@ -76,7 +76,7 @@ if [ -n "$FIREWALL_WINDOW" ] ; then ERLANG_OPTS="$ERLANG_OPTS -kernel inet_dist_listen_min ${FIREWALL_WINDOW%-*} inet_dist_listen_max ${FIREWALL_WINDOW#*-}" fi if [ -n "$INET_DIST_INTERFACE" ] ; then - INET_DIST_INTERFACE2=$("$ERL" -noshell -eval 'case inet:parse_address("'$INET_DIST_INTERFACE'") of {ok,IP} -> io:format("~p",[IP]); _ -> ok end.' -s erlang halt) + INET_DIST_INTERFACE2=$("$ERL" $ERLANG_OPTS -noshell -eval 'case inet:parse_address("'$INET_DIST_INTERFACE'") of {ok,IP} -> io:format("~p",[IP]); _ -> ok end.' -s erlang halt) if [ -n "$INET_DIST_INTERFACE2" ] ; then ERLANG_OPTS="$ERLANG_OPTS -kernel inet_dist_use_interface $INET_DIST_INTERFACE2" fi