diff options
| author | Jared Kauppila <Jared@Kauppi.la> | 2015-07-29 15:21:00 -0500 |
|---|---|---|
| committer | Jared Kauppila <Jared@Kauppi.la> | 2015-07-29 15:21:00 -0500 |
| commit | 1f61e4fae109561572beca3f0ddc9c7624622126 (patch) | |
| tree | 58ec049dd340b3b6f4b42538b9e6a6c50523fd0c | |
| parent | aaa09daf1a451d141a49a2b90238db9852d657d9 (diff) | |
| download | rabbitmq-server-git-1f61e4fae109561572beca3f0ddc9c7624622126.tar.gz | |
Fixes a logic problem with NODE_IP_ADDRESS and NODE_PORT in rabbitmq-env.bat.
Fixes the logic for NODE_IP_ADDRESS and NODE_PORT. First, check for the existence of the environment variable, then the definition if set via conf file, then proceed with the original logic on setting the IP/Port variables.
| -rw-r--r-- | scripts/rabbitmq-env.bat | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/scripts/rabbitmq-env.bat b/scripts/rabbitmq-env.bat index 8657f1e609..bcba8c43ef 100644 --- a/scripts/rabbitmq-env.bat +++ b/scripts/rabbitmq-env.bat @@ -84,23 +84,28 @@ REM set RABBITMQ_NODE_PORT=5672 REM ) REM ) -REM DOUBLE CHECK THIS LOGIC if "!RABBITMQ_NODE_IP_ADDRESS!"=="" ( - if "!NODE_IP_ADDRESS!"=="" ( - set RABBITMQ_NODE_IP_ADDRESS=auto - ) else ( + if not "!NODE_IP_ADDRESS!"=="" ( set RABBITMQ_NODE_IP_ADDRESS=!NODE_IP_ADDRESS! ) ) if "!RABBITMQ_NODE_PORT!"=="" ( - if "!NODE_PORT!"=="" ( - set RABBITMQ_NODE_PORT=5672 - ) else ( + if not "!NODE_PORT!"=="" ( set RABBITMQ_NODE_PORT=!NODE_PORT! ) ) +if "!RABBITMQ_NODE_IP_ADDRESS!"=="" ( + if not "!RABBITMQ_NODE_PORT!"=="" ( + set RABBITMQ_NODE_IP_ADDRESS=auto + ) +) else ( + if "!RABBITMQ_NODE_PORT!"=="" ( + set RABBITMQ_NODE_PORT=5672 + ) +) + REM [ "x" = "x$RABBITMQ_DIST_PORT" ] && RABBITMQ_DIST_PORT=${DIST_PORT} REM [ "x" = "x$RABBITMQ_DIST_PORT" ] && [ "x" = "x$RABBITMQ_NODE_PORT" ] && RABBITMQ_DIST_PORT=$((${DEFAULT_NODE_PORT} + 20000)) REM [ "x" = "x$RABBITMQ_DIST_PORT" ] && [ "x" != "x$RABBITMQ_NODE_PORT" ] && RABBITMQ_DIST_PORT=$((${RABBITMQ_NODE_PORT} + 20000)) |
