Browse Source

fix(bin/emqx): do not check cookie when it's a boot command

Zaiming (Stone) Shi 3 years atrás
parent
commit
f6cb5b607c
1 changed files with 1 additions and 1 deletions
  1. 1 1
      bin/emqx

+ 1 - 1
bin/emqx

@@ -945,7 +945,7 @@ if [ -n "${EMQX_NODE_COOKIE:-}" ]; then
 fi
 fi
 COOKIE="${EMQX_NODE__COOKIE:-}"
 COOKIE="${EMQX_NODE__COOKIE:-}"
 COOKIE_IN_USE="$(get_boot_config 'node.cookie')"
 COOKIE_IN_USE="$(get_boot_config 'node.cookie')"
-if [ -n "$COOKIE_IN_USE" ] && [ -n "$COOKIE" ] && [ "$COOKIE" != "$COOKIE_IN_USE" ]; then
+if [ "$IS_BOOT_COMMAND" != 'yes' ] && [ -n "$COOKIE_IN_USE" ] && [ -n "$COOKIE" ] && [ "$COOKIE" != "$COOKIE_IN_USE" ]; then
     die "EMQX_NODE__COOKIE is different from the cookie used by $NAME"
     die "EMQX_NODE__COOKIE is different from the cookie used by $NAME"
 fi
 fi
 [ -z "$COOKIE" ] && COOKIE="$COOKIE_IN_USE"
 [ -z "$COOKIE" ] && COOKIE="$COOKIE_IN_USE"