summaryrefslogtreecommitdiff
path: root/scripts/rabbitmq-server
diff options
context:
space:
mode:
authorPaul Jones <paulj@lshift.net>2009-09-21 09:28:46 +0100
committerPaul Jones <paulj@lshift.net>2009-09-21 09:28:46 +0100
commit52137e960d16a3637edb63777a4e015eb5a9ac77 (patch)
treeebd10ca1039df9f9538ce674f6e9c73fd72042a0 /scripts/rabbitmq-server
parentfb9cb12ac7cde685389aee9488131446a44b40dc (diff)
downloadrabbitmq-server-52137e960d16a3637edb63777a4e015eb5a9ac77.tar.gz
Added facility to provide a configuration file to rabbit startup for Unix systems
Diffstat (limited to 'scripts/rabbitmq-server')
-rwxr-xr-xscripts/rabbitmq-server4
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/rabbitmq-server b/scripts/rabbitmq-server
index 547220b4..1141fdd9 100755
--- a/scripts/rabbitmq-server
+++ b/scripts/rabbitmq-server
@@ -40,6 +40,7 @@ CLUSTER_CONFIG_FILE=/etc/rabbitmq/rabbitmq_cluster.config
LOG_BASE=/var/log/rabbitmq
MNESIA_BASE=/var/lib/rabbitmq/mnesia
SERVER_START_ARGS=
+[ "x" = "x$RABBITMQ_CONFIG_FILE" ] && RABBITMQ_CONFIG_FILE=/etc/rabbitmq/rabbitmq
. `dirname $0`/rabbitmq-env
@@ -83,6 +84,8 @@ else
RABBITMQ_BOOT_FILE=start_sasl
RABBITMQ_EBIN_PATH="-pa ${RABBITMQ_EBIN_ROOT}"
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
@@ -94,6 +97,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}'}]' \