Merge pull request #10204 from lafirest/fix/dis_with_ssl

fix: add back the support for the `WITH_EPMD` macro
This commit is contained in:
lafirest 2023-03-30 17:13:13 +08:00 committed by GitHub
commit 1a46add3e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 5 deletions

View File

@ -517,12 +517,19 @@ case "$1" in
;;
esac
EPMD_ARG="-start_epmd false -epmd_module ekka_epmd -proto_dist ekka"
PROTO_DIST=$(grep -E '^[ \t]*cluster.proto_dist[ \t]*=[ \t]*' "$RUNNER_ETC_DIR/emqx.conf" 2> /dev/null | tail -1 | awk -F"= " '{print $NF}')
# this environment variable is required by ekka_dist module
# because proto_dist is overriden to ekka, and there is a lack of ekka_tls module
export EKKA_PROTO_DIST_MOD="${PROTO_DIST:-inet_tcp}"
if [ "$EKKA_PROTO_DIST_MOD" = 'inet_tls' ]; then
if [ -n "$WITH_EPMD" ]; then
EPMD_ARG="-start_epmd true -proto_dist $PROTO_DIST"
else
EPMD_ARG="-start_epmd false -epmd_module ekka_epmd -proto_dist ekka"
# this environment variable is required by ekka_dist module
# because proto_dist is overriden to ekka, and there is a lack of ekka_tls module
export EKKA_PROTO_DIST_MOD="${PROTO_DIST:-inet_tcp}"
fi
if [ "$PROTO_DIST" = 'inet_tls' ]; then
SSL_DIST_OPTFILE=${EMQX_SSL_DIST_OPTFILE:-"$RUNNER_ETC_DIR/ssl_dist.conf"}
case "$SSL_DIST_OPTFILE" in
*\ *)