diff options
author | Emile Joubert <emile@rabbitmq.com> | 2010-09-16 16:18:36 +0100 |
---|---|---|
committer | Emile Joubert <emile@rabbitmq.com> | 2010-09-16 16:18:36 +0100 |
commit | 78090afc673f83ca12d2a3b085146a00ba2307c5 (patch) | |
tree | 4900464e9c025af6e6c98928fd99802400e4823b | |
parent | 9df14122325caa6acf00e30de2e2062089a5dff1 (diff) | |
download | rabbitmq-server-78090afc673f83ca12d2a3b085146a00ba2307c5.tar.gz |
Avoid starting rabbit app on plugin activation
-rwxr-xr-x | scripts/rabbitmq-server | 5 | ||||
-rw-r--r-- | scripts/rabbitmq-server.bat | 6 | ||||
-rw-r--r-- | src/rabbit_plugin_activator.erl | 6 |
3 files changed, 4 insertions, 13 deletions
diff --git a/scripts/rabbitmq-server b/scripts/rabbitmq-server index 9310752f..92ce3209 100755 --- a/scripts/rabbitmq-server +++ b/scripts/rabbitmq-server @@ -88,13 +88,10 @@ RABBITMQ_EBIN_ROOT="${RABBITMQ_HOME}/ebin" if [ "x" = "x$RABBITMQ_NODE_ONLY" ]; then if erl \ -pa "$RABBITMQ_EBIN_ROOT" \ - -rabbit plugins_dir "\"$RABBITMQ_PLUGINS_DIR\"" \ - -rabbit plugins_expand_dir "\"${RABBITMQ_MNESIA_DIR}/plugins-scratch\"" \ - -rabbit rabbit_ebin "\"$RABBITMQ_EBIN_ROOT\"" \ -noinput \ -hidden \ -s rabbit_plugin_activator \ - -extra "$@" + -extra "$RABBITMQ_PLUGINS_DIR" "${RABBITMQ_MNESIA_DIR}/plugins-scratch" then RABBITMQ_BOOT_FILE="${RABBITMQ_MNESIA_DIR}/plugins-scratch/rabbit" RABBITMQ_EBIN_PATH="" diff --git a/scripts/rabbitmq-server.bat b/scripts/rabbitmq-server.bat index 5bcbc6ba..4d90d90c 100644 --- a/scripts/rabbitmq-server.bat +++ b/scripts/rabbitmq-server.bat @@ -114,10 +114,8 @@ set RABBITMQ_EBIN_ROOT=!TDP0!..\ebin -pa "!RABBITMQ_EBIN_ROOT!" ^
-noinput -hidden ^
-s rabbit_plugin_activator ^
--rabbit plugins_dir \""!RABBITMQ_PLUGINS_DIR:\=/!"\" ^
--rabbit plugins_expand_dir \""!RABBITMQ_MNESIA_DIR:\=/!/plugins-scratch"\" ^
--rabbit rabbit_ebin \""!RABBITMQ_EBIN_ROOT:\=/!"\" ^
--extra !STAR!
+-extra "!RABBITMQ_PLUGINS_DIR:\=/!" ^
+ "!RABBITMQ_MNESIA_DIR:\=/!/plugins-scratch"
set RABBITMQ_BOOT_FILE=!RABBITMQ_MNESIA_DIR!\plugins-scratch\rabbit
if not exist "!RABBITMQ_BOOT_FILE!.boot" (
diff --git a/src/rabbit_plugin_activator.erl b/src/rabbit_plugin_activator.erl index b23776cd..3d9a8a95 100644 --- a/src/rabbit_plugin_activator.erl +++ b/src/rabbit_plugin_activator.erl @@ -52,13 +52,9 @@ start() -> io:format("Activating RabbitMQ plugins ...~n"), - %% Ensure Rabbit is loaded so we can access it's environment - application:load(rabbit), %% Determine our various directories - PluginDir = get_env(plugins_dir, ?DefaultPluginDir), - UnpackedPluginDir = get_env(plugins_expand_dir, ?DefaultUnpackedPluginDir), - + [PluginDir, UnpackedPluginDir] = init:get_plain_arguments(), RootName = UnpackedPluginDir ++ "/rabbit", %% Unpack any .ez plugins |