#!/usr/bin/env bash # For security reasons, we need to configure RabbitMQ to listen only # on localhost, which we cannot do if the nodename contains the # hostname (e.g. rabbit@zulip-host). Containing the hostname also # makes it brittle to hostname changes, which are (for example) common # in containerized environments. set -eu # Try to find the current nodename CURRENT=$(sh -c 'cd /usr/lib/rabbitmq/bin/ && . ./rabbitmq-env && echo $NODENAME') if [ "$CURRENT" != "zulip@localhost" ]; then cat <