diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/rabbitmq-server | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/scripts/rabbitmq-server b/scripts/rabbitmq-server index 18d24542..bd397441 100755 --- a/scripts/rabbitmq-server +++ b/scripts/rabbitmq-server @@ -87,6 +87,8 @@ esac RABBITMQ_EBIN_ROOT="${RABBITMQ_HOME}/ebin" +set +e + RABBITMQ_CONFIG_FILE=$RABBITMQ_CONFIG_FILE \ RABBITMQ_DIST_PORT=$RABBITMQ_DIST_PORT \ ${ERL_DIR}erl -pa "$RABBITMQ_EBIN_ROOT" \ @@ -98,13 +100,18 @@ RABBITMQ_DIST_PORT=$RABBITMQ_DIST_PORT \ -extra "${RABBITMQ_NODENAME}" PRELAUNCH_RESULT=$? -if [ ${PRELAUNCH_RESULT} = 1 ] ; then - exit 1 +if [ ${PRELAUNCH_RESULT} = 2 ] ; then + # dist port is mentioned in config, so do not set it + true elif [ ${PRELAUNCH_RESULT} = 0 ] ; then # dist port is not mentioned in the config file, we can set it RABBITMQ_DIST_ARG="-kernel inet_dist_listen_min ${RABBITMQ_DIST_PORT} -kernel inet_dist_listen_max ${RABBITMQ_DIST_PORT}" +else + exit ${PRELAUNCH_RESULT} fi +set -e + RABBITMQ_CONFIG_ARG= [ -f "${RABBITMQ_CONFIG_FILE}.config" ] && RABBITMQ_CONFIG_ARG="-config ${RABBITMQ_CONFIG_FILE}" |