Merge pull request #10339 from lafirest/fix/emqx_script

fix(script): add default value for "$PROTO_DIST"
This commit is contained in:
lafirest 2023-04-06 13:52:09 +08:00 committed by GitHub
commit 891ed4bfad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -518,6 +518,7 @@ case "$1" in
esac 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=$(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 if [ -n "$WITH_EPMD" ]; then
EPMD_ARG="-start_epmd true -proto_dist $PROTO_DIST" EPMD_ARG="-start_epmd true -proto_dist $PROTO_DIST"
@ -526,7 +527,7 @@ else
# this environment variable is required by ekka_dist module # 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 # 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 fi
if [ "$PROTO_DIST" = 'inet_tls' ]; then if [ "$PROTO_DIST" = 'inet_tls' ]; then