summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Klishin <michael@novemberain.com>2017-05-31 00:34:43 +0300
committerGitHub <noreply@github.com>2017-05-31 00:34:43 +0300
commit0d8528a208b3600079bd6b64cd5999d73d0a7354 (patch)
tree8a94ec6c9153c52925cd22e2e89fec3ee49e7d57
parent2641939e59ec9356b6228f89627b0ea32d2dd57d (diff)
parentd9e2c27f70c3c9dcae48f5b1b910c45383094279 (diff)
downloadrabbitmq-server-git-0d8528a208b3600079bd6b64cd5999d73d0a7354.tar.gz
Merge pull request #1239 from rabbitmq/rabbitmq-server-1221
Configure MNESIA_BASE and MNESIA_DIR on dev environment
-rwxr-xr-xscripts/rabbitmq-env16
1 files changed, 14 insertions, 2 deletions
diff --git a/scripts/rabbitmq-env b/scripts/rabbitmq-env
index f1624eddf9..d74a3b173a 100755
--- a/scripts/rabbitmq-env
+++ b/scripts/rabbitmq-env
@@ -270,10 +270,14 @@ if [ "${RABBITMQ_DEV_ENV}" ]; then
eval $( (${RABBITMQ_SCRIPTS_DIR}/rabbitmqctl eval \
'{ok, P} = application:get_env(rabbit, plugins_dir),
{ok, E} = application:get_env(rabbit, enabled_plugins_file),
+ B = os:getenv("RABBITMQ_MNESIA_BASE"),
+ M = os:getenv("RABBITMQ_MNESIA_DIR"),
io:format(
"plugins_dir=\"~s\"~n"
- "enabled_plugins_file=\"~s\"~n", [P, E]).' \
- 2>/dev/null | head -n 2) || :)
+ "enabled_plugins_file=\"~s\"~n"
+ "mnesia_base=\"~s\"~n"
+ "mnesia_dir=\"~s\"~n", [P, E, B, M]).' \
+ 2>/dev/null | head -n 4) || :)
if [ "${plugins_dir}" -a \
"$RABBITMQ_PLUGINS_DIR_source" != 'environment' ]; then
RABBITMQ_PLUGINS_DIR="${plugins_dir}"
@@ -282,6 +286,14 @@ if [ "${RABBITMQ_DEV_ENV}" ]; then
"$RABBITMQ_ENABLED_PLUGINS_FILE_source" != 'environment' ]; then
RABBITMQ_ENABLED_PLUGINS_FILE="${enabled_plugins_file}"
fi
+ if [ "${mnesia_base}" -a \
+ "$RABBITMQ_MNESIA_BASE_source" != 'environment' ]; then
+ RABBITMQ_MNESIA_BASE="${mnesia_base}"
+ fi
+ if [ "${mnesia_dir}" -a \
+ "$RABBITMQ_MNESIA_DIR_source" != 'environment' ]; then
+ RABBITMQ_MNESIA_DIR="${mnesia_dir}"
+ fi
fi
if path_contains_existing_directory "${RABBITMQ_PLUGINS_DIR}" ; then