diff options
| author | Jean-Sébastien Pédron <jean-sebastien@rabbitmq.com> | 2015-09-25 12:05:42 +0200 |
|---|---|---|
| committer | Jean-Sébastien Pédron <jean-sebastien.pedron@dumbbell.fr> | 2015-10-20 11:10:48 +0200 |
| commit | bab7368ea3575051140e95a20140eaeba5ceb85f (patch) | |
| tree | 2c70ab8fe1787cab70908aedb6c98252e85a7de4 | |
| parent | 7e2dfd6ac35677d8e51ba8313fa545a6000fb501 (diff) | |
| download | rabbitmq-server-git-bab7368ea3575051140e95a20140eaeba5ceb85f.tar.gz | |
rabbitmq-env: Fix vars for rabbitmq-plugins before setting ERL_LIBS
| -rwxr-xr-x | scripts/rabbitmq-env | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/scripts/rabbitmq-env b/scripts/rabbitmq-env index c19338205c..e66ef98956 100755 --- a/scripts/rabbitmq-env +++ b/scripts/rabbitmq-env @@ -237,6 +237,24 @@ rmq_check_if_shared_with_mnesia \ ## Development-specific environment. if [ "${RABBITMQ_DEV_ENV}" ]; then + if [ "$(basename "$0")" = 'rabbitmq-plugins' ]; then + # We need to query the running node for the plugins directory + # and the "enabled plugins" file. + eval $( (${RABBITMQ_SCRIPTS_DIR}/rabbitmqctl eval \ + '{ok, P} = application:get_env(rabbit, plugins_dir), + {ok, E} = application:get_env(rabbit, enabled_plugins_file), + io:format( + "plugins_dir=\"~s\"~n" + "enabled_plugins_file=\"~s\"~n", [P, E]).' \ + 2>/dev/null | head -n 2) || :) + if [ "${plugins_dir}" ]; then + RABBITMQ_PLUGINS_DIR="${plugins_dir}" + fi + if [ "${enabled_plugins_file}" ]; then + RABBITMQ_ENABLED_PLUGINS_FILE="${enabled_plugins_file}" + fi + fi + # When RabbitMQ or the rabbitmq* scripts are started from the source # directory, they need the location of rabbit_common. @@ -255,24 +273,6 @@ if [ "${RABBITMQ_DEV_ENV}" ]; then ERL_LIBS=${ERL_LIBS%:} export ERL_LIBS - - if [ "$(basename "$0")" = 'rabbitmq-plugins' ]; then - # We need to query the running node for the plugins directory - # and the "enabled plugins" file. - eval $( (${RABBITMQ_SCRIPTS_DIR}/rabbitmqctl eval \ - '{ok, P} = application:get_env(rabbit, plugins_dir), - {ok, E} = application:get_env(rabbit, enabled_plugins_file), - io:format( - "plugins_dir=\"~s\"~n" - "enabled_plugins_file=\"~s\"~n", [P, E]).' \ - 2>/dev/null | head -n 2) || :) - if [ "${plugins_dir}" ]; then - RABBITMQ_PLUGINS_DIR="${plugins_dir}" - fi - if [ "${enabled_plugins_file}" ]; then - RABBITMQ_ENABLED_PLUGINS_FILE="${enabled_plugins_file}" - fi - fi fi RABBITMQ_ENV_LOADED=1 |
