Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure EPMD env vars are exported if set #1731

Merged
merged 1 commit into from
Oct 11, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions scripts/rabbitmq-env
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,9 @@ saved_RABBITMQ_PID_FILE="$RABBITMQ_PID_FILE"
[ "x" = "x$RABBITMQ_CONF_ENV_FILE" ] && RABBITMQ_CONF_ENV_FILE=${CONF_ENV_FILE}
[ -f ${RABBITMQ_CONF_ENV_FILE} ] && . ${RABBITMQ_CONF_ENV_FILE} || true

[ -n "$ERL_EPMD_PORT" ] && export ERL_EPMD_PORT
[ -n "$ERL_EPMD_ADDRESS" ] && export ERL_EPMD_ADDRESS

DEFAULT_SCHEDULER_BIND_TYPE="db"
[ -n "$SCHEDULER_BIND_TYPE" ] || SCHEDULER_BIND_TYPE="$DEFAULT_SCHEDULER_BIND_TYPE"
[ -n "$RABBITMQ_SCHEDULER_BIND_TYPE" ] || RABBITMQ_SCHEDULER_BIND_TYPE="$SCHEDULER_BIND_TYPE"
Expand Down Expand Up @@ -391,15 +394,17 @@ run_escript()
escript="${1:?escript must be defined}"
shift

# Important: do not quote RABBITMQ_CTL_ERL_ARGS as they must be
# word-split
# shellcheck disable=SC2086
exec "${ERL_DIR}erl" +B \
-boot "${CLEAN_BOOT_FILE}" \
-boot "$CLEAN_BOOT_FILE" \
-noinput -noshell -hidden -smp enable \
$RABBITMQ_CTL_ERL_ARGS \
-kernel inet_dist_listen_min "$RABBITMQ_CTL_DIST_PORT_MIN" \
-kernel inet_dist_listen_max "$RABBITMQ_CTL_DIST_PORT_MAX" \
-sasl errlog_type error \
-mnesia dir "\"${RABBITMQ_MNESIA_DIR}\"" \
-mnesia dir "\"$RABBITMQ_MNESIA_DIR\"" \
-nodename "$RABBITMQ_NODENAME" \
-run escript start \
-escript main "$escript_main" \
Expand Down