fix: add back the support for the `WITH_EPMD` macro

This commit is contained in:
firest 2023-03-22 15:51:03 +08:00
parent 4f3f9d533c
commit 100477130b
1 changed files with 12 additions and 5 deletions

View File

@ -517,12 +517,19 @@ case "$1" in
;; ;;
esac 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}') 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 if [ -n "$WITH_EPMD" ]; then
export EKKA_PROTO_DIST_MOD="${PROTO_DIST:-inet_tcp}" EPMD_ARG="-start_epmd true -proto_dist $PROTO_DIST"
if [ "$EKKA_PROTO_DIST_MOD" = 'inet_tls' ]; then 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"} SSL_DIST_OPTFILE=${EMQX_SSL_DIST_OPTFILE:-"$RUNNER_ETC_DIR/ssl_dist.conf"}
case "$SSL_DIST_OPTFILE" in case "$SSL_DIST_OPTFILE" in
*\ *) *\ *)