diff options
author | David Wragg <dpw@lshift.net> | 2009-10-04 23:18:58 +0100 |
---|---|---|
committer | David Wragg <dpw@lshift.net> | 2009-10-04 23:18:58 +0100 |
commit | ff10bc16da389b80b070cdb94c255caf77d7cb44 (patch) | |
tree | fdedee06a46b482162954808bde165ca5e5d4ff4 | |
parent | cd9aeb97695a1431ff9a3fff63777898f60b1ceb (diff) | |
parent | 1c81db1791240f72a9f4c3143878651ff6bc2d72 (diff) | |
download | rabbitmq-server-ff10bc16da389b80b070cdb94c255caf77d7cb44.tar.gz |
Merge bug21222 into default
-rwxr-xr-x | scripts/rabbitmq-server | 5 | ||||
-rwxr-xr-x | scripts/rabbitmq-server.bat | 11 |
2 files changed, 15 insertions, 1 deletions
diff --git a/scripts/rabbitmq-server b/scripts/rabbitmq-server index 7a257834..67768c0e 100755 --- a/scripts/rabbitmq-server +++ b/scripts/rabbitmq-server @@ -37,6 +37,7 @@ SERVER_ERL_ARGS="+K true +A30 \ -kernel inet_default_listen_options [{nodelay,true},{sndbuf,16384},{recbuf,4096}] \ -kernel inet_default_connect_options [{nodelay,true}]" CLUSTER_CONFIG_FILE=/etc/rabbitmq/rabbitmq_cluster.config +CONFIG_FILE=/etc/rabbitmq/rabbitmq LOG_BASE=/var/log/rabbitmq MNESIA_BASE=/var/lib/rabbitmq/mnesia SERVER_START_ARGS= @@ -48,6 +49,7 @@ SERVER_START_ARGS= [ "x" = "x$RABBITMQ_NODE_PORT" ] && RABBITMQ_NODE_PORT=${NODE_PORT} [ "x" = "x$RABBITMQ_SERVER_ERL_ARGS" ] && RABBITMQ_SERVER_ERL_ARGS=${SERVER_ERL_ARGS} [ "x" = "x$RABBITMQ_CLUSTER_CONFIG_FILE" ] && RABBITMQ_CLUSTER_CONFIG_FILE=${CLUSTER_CONFIG_FILE} +[ "x" = "x$RABBITMQ_CONFIG_FILE" ] && RABBITMQ_CONFIG_FILE=${CONFIG_FILE} [ "x" = "x$RABBITMQ_LOG_BASE" ] && RABBITMQ_LOG_BASE=${LOG_BASE} [ "x" = "x$RABBITMQ_MNESIA_BASE" ] && RABBITMQ_MNESIA_BASE=${MNESIA_BASE} [ "x" = "x$RABBITMQ_SERVER_START_ARGS" ] && RABBITMQ_SERVER_START_ARGS=${SERVER_START_ARGS} @@ -84,6 +86,8 @@ else RABBITMQ_EBIN_PATH="-pa ${RABBITMQ_EBIN_ROOT}" [ "x" = "x$RABBITMQ_NODE_ONLY" ] && RABBITMQ_START_RABBIT="${RABBITMQ_START_RABBIT} -s rabbit" fi +RABBITMQ_CONFIG_ARG= +[ -f "${RABBITMQ_CONFIG_FILE}.config" ] && RABBITMQ_CONFIG_ARG="-config ${RABBITMQ_CONFIG_FILE}" # we need to turn off path expansion because some of the vars, notably # RABBITMQ_SERVER_ERL_ARGS, contain terms that look like globs and @@ -95,6 +99,7 @@ exec erl \ ${RABBITMQ_START_RABBIT} \ -sname ${RABBITMQ_NODENAME} \ -boot ${RABBITMQ_BOOT_FILE} \ + ${RABBITMQ_CONFIG_ARG} \ +W w \ ${RABBITMQ_SERVER_ERL_ARGS} \ -rabbit tcp_listeners '[{"'${RABBITMQ_NODE_IP_ADDRESS}'", '${RABBITMQ_NODE_PORT}'}]' \ diff --git a/scripts/rabbitmq-server.bat b/scripts/rabbitmq-server.bat index a784fee3..40f47c4b 100755 --- a/scripts/rabbitmq-server.bat +++ b/scripts/rabbitmq-server.bat @@ -109,11 +109,20 @@ if exist "%RABBITMQ_EBIN_ROOT%\rabbit.boot" ( set RABBITMQ_BOOT_FILE=start_sasl
set RABBITMQ_EBIN_PATH=-pa "%RABBITMQ_EBIN_ROOT%"
)
+if "%RABBITMQ_CONFIG_FILE%"=="" (
+ set RABBITMQ_CONFIG_FILE="%RABBITMQ_BASE%\rabbitmq"
+)
+
+if exist "%RABBITMQ_CONFIG_FILE%.config" (
+ set RABBITMQ_CONFIG_ARG=-config "%RABBITMQ_CONFIG_FILE%"
+) else (
+ set RABBITMQ_CONFIG_ARG=""
+)
"%ERLANG_HOME%\bin\erl.exe" ^
%RABBITMQ_EBIN_PATH% ^
-noinput ^
--boot %RABBITMQ_BOOT_FILE% ^
+-boot %RABBITMQ_BOOT_FILE% %RABBITMQ_CONFIG_ARG% ^
-sname %RABBITMQ_NODENAME% ^
-s rabbit ^
+W w ^
|