|
@@ -525,11 +525,11 @@ else
|
|
|
## only one emqx node is running, get running args from 'ps -ef' output
|
|
## only one emqx node is running, get running args from 'ps -ef' output
|
|
|
tmp_nodename=$(echo -e "$PS_LINE" | $GREP -oE "\s\-s?name.*" | awk '{print $2}' || true)
|
|
tmp_nodename=$(echo -e "$PS_LINE" | $GREP -oE "\s\-s?name.*" | awk '{print $2}' || true)
|
|
|
tmp_cookie=$(echo -e "$PS_LINE" | $GREP -oE "\s\-setcookie.*" | awk '{print $2}' || true)
|
|
tmp_cookie=$(echo -e "$PS_LINE" | $GREP -oE "\s\-setcookie.*" | awk '{print $2}' || true)
|
|
|
- tmp_dist="$(echo -e "$PS_LINE" | $GREP -oE '\-ssl_dist_optfile\s.+\s' | awk '{print $2}' || true)"
|
|
|
|
|
|
|
+ SSL_DIST_OPTFILE="$(echo -e "$PS_LINE" | $GREP -oE '\-ssl_dist_optfile\s.+\s' | awk '{print $2}' || true)"
|
|
|
tmp_ticktime="$(echo -e "$PS_LINE" | $GREP -oE '\s\-kernel\snet_ticktime\s.+\s' | awk '{print $3}' || true)"
|
|
tmp_ticktime="$(echo -e "$PS_LINE" | $GREP -oE '\s\-kernel\snet_ticktime\s.+\s' | awk '{print $3}' || true)"
|
|
|
# data_dir is actually not needed, but kept anyway
|
|
# data_dir is actually not needed, but kept anyway
|
|
|
tmp_datadir="$(echo -e "$PS_LINE" | $GREP -oE "\-emqx_data_dir.*" | sed -E 's#.+emqx_data_dir[[:blank:]]##g' | sed -E 's#[[:blank:]]--$##g' || true)"
|
|
tmp_datadir="$(echo -e "$PS_LINE" | $GREP -oE "\-emqx_data_dir.*" | sed -E 's#.+emqx_data_dir[[:blank:]]##g' | sed -E 's#[[:blank:]]--$##g' || true)"
|
|
|
- if [ -z "$tmp_dist" ]; then
|
|
|
|
|
|
|
+ if [ -z "$SSL_DIST_OPTFILE" ]; then
|
|
|
tmp_proto='inet_tcp'
|
|
tmp_proto='inet_tcp'
|
|
|
else
|
|
else
|
|
|
tmp_proto='inet_tls'
|
|
tmp_proto='inet_tls'
|
|
@@ -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"
|