From d026434286c8b9944a0ad67df8db1c4327a8a5ea Mon Sep 17 00:00:00 2001 From: firest Date: Thu, 6 Apr 2023 11:51:40 +0800 Subject: [PATCH] fix(script): add default value for "$PROTO_DIST" --- bin/emqx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/emqx b/bin/emqx index d7226f49a..191b7bda7 100755 --- a/bin/emqx +++ b/bin/emqx @@ -518,6 +518,7 @@ case "$1" in esac 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="${PROTO_DIST:-inet_tcp}" if [ -n "$WITH_EPMD" ]; then EPMD_ARG="-start_epmd true -proto_dist $PROTO_DIST" @@ -526,7 +527,7 @@ else # 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}" + export EKKA_PROTO_DIST_MOD="$PROTO_DIST" fi if [ "$PROTO_DIST" = 'inet_tls' ]; then