diff --git a/.ci/fvt_tests/docker-compose.yaml b/.ci/fvt_tests/docker-compose.yaml index a71b910eb..00b5712bc 100644 --- a/.ci/fvt_tests/docker-compose.yaml +++ b/.ci/fvt_tests/docker-compose.yaml @@ -46,7 +46,7 @@ services: sed -i '/emqx_telemetry/d' /opt/emqx/data/loaded_plugins /opt/emqx/bin/emqx foreground healthcheck: - test: ["CMD", "/opt/emqx/bin/emqx_ctl", "status"] + test: ["CMD", "/opt/emqx/bin/emqx", "ping"] interval: 5s timeout: 25s retries: 5 diff --git a/bin/emqx b/bin/emqx index a2c8a5be9..167cd5cf1 100755 --- a/bin/emqx +++ b/bin/emqx @@ -262,6 +262,8 @@ fi if [ -z "$NAME_ARG" ]; then NODENAME="${EMQX_NODE_NAME:-}" + # compatible with docker entrypoint + [ -z "$NODENAME" ] && [ -n "$EMQX_NAME" ] && [ -n "$EMQX_HOST" ] && NODENAME="${EMQX_NAME}@${EMQX_HOST}" [ -z "$NODENAME" ] && NODENAME=$(grep -E '^[ \t]*node.name[ \t]*=[ \t]*' "$RUNNER_ETC_DIR/emqx.conf" 2> /dev/null | tail -1 | cut -d = -f 2-) if [ -z "$NODENAME" ]; then echoerr "vm.args needs to have a -name parameter."