diff options
| author | Jean-Sébastien Pédron <jean-sebastien@rabbitmq.com> | 2016-09-27 11:20:29 +0200 |
|---|---|---|
| committer | Jean-Sébastien Pédron <jean-sebastien@rabbitmq.com> | 2016-09-27 11:20:29 +0200 |
| commit | 25de0db933521881673c3889865815abc82b75e7 (patch) | |
| tree | a182ea38e97faed13bc0ea94a9bbe641b3377dcf /scripts/rabbitmq-server | |
| parent | e7ae83f5cf81b103f3f1e46a64a1e0053dc4ba74 (diff) | |
| parent | a40b517c4f20be94bc007e83541e18a3da85b5f5 (diff) | |
| download | rabbitmq-server-git-25de0db933521881673c3889865815abc82b75e7.tar.gz | |
Merge branch 'stable' into rabbitmq-management-236
Diffstat (limited to 'scripts/rabbitmq-server')
| -rwxr-xr-x | scripts/rabbitmq-server | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/scripts/rabbitmq-server b/scripts/rabbitmq-server index 74337311cd..7b0599e88f 100755 --- a/scripts/rabbitmq-server +++ b/scripts/rabbitmq-server @@ -62,6 +62,17 @@ RABBITMQ_EBIN_ROOT="${RABBITMQ_HOME}/ebin" set +e +# `net_kernel:start/1` will fail in `longnames` mode when erlang is +# unable to determine FQDN of a node (with a dot in it). But `erl` +# itself has some magic that still allow it to start when you +# explicitly specify host (a.la `erl -name test@localhost`). +# +# It's not possible to communicate with this node, unless it's a +# connection initiator. But as prelaunch IS an initiator, it doesn't +# matter what we actually put here. But `localhost` sounds good +# enough. +RABBITMQ_PRELAUNCH_NODENAME="rabbitmqprelaunch${$}@localhost" + # NOTIFY_SOCKET is needed here to prevent epmd from impersonating the # success of our startup sequence to systemd. NOTIFY_SOCKET= \ @@ -72,7 +83,7 @@ RABBITMQ_DIST_PORT=$RABBITMQ_DIST_PORT \ -noinput \ -hidden \ -s rabbit_prelaunch \ - ${RABBITMQ_NAME_TYPE} rabbitmqprelaunch$$ \ + ${RABBITMQ_NAME_TYPE} ${RABBITMQ_PRELAUNCH_NODENAME} \ -extra "${RABBITMQ_NODENAME}" PRELAUNCH_RESULT=$? @@ -213,9 +224,8 @@ else # When RabbitMQ runs in the foreground but the Erlang shell is # disabled, we setup signal handlers to stop RabbitMQ properly. This # is at least useful in the case of Docker. - # The Erlang VM should ignore SIGINT. - RABBITMQ_SERVER_START_ARGS="${RABBITMQ_SERVER_START_ARGS} +B i" + RABBITMQ_SERVER_START_ARGS="${RABBITMQ_SERVER_START_ARGS} ${RABBITMQ_IGNORE_SIGINT_FLAG}" # Signal handlers. They all stop RabbitMQ properly (using # rabbitmqctl stop). Depending on the signal, this script will exit |
