diff options
author | Simon MacMullen <simon@rabbitmq.com> | 2014-06-09 18:08:16 +0100 |
---|---|---|
committer | Simon MacMullen <simon@rabbitmq.com> | 2014-06-09 18:08:16 +0100 |
commit | 55a8cdf03e0f5c1e08a236360cf35423146fa7b7 (patch) | |
tree | ad50a05848efba00b337c64ae2e119aae78a026c | |
parent | 74aa990f3c72aa97b6bb5b46ba64c60e0ae3f013 (diff) | |
download | rabbitmq-server-55a8cdf03e0f5c1e08a236360cf35423146fa7b7.tar.gz |
Add (deliberately) undocumented feature to just trigger the sync without updating the config file.
-rw-r--r-- | src/rabbit_plugins_main.erl | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/rabbit_plugins_main.erl b/src/rabbit_plugins_main.erl index 78313eee..d655e714 100644 --- a/src/rabbit_plugins_main.erl +++ b/src/rabbit_plugins_main.erl @@ -41,7 +41,8 @@ -define(COMMANDS, [{list, [?VERBOSE_DEF, ?MINIMAL_DEF, ?ENABLED_DEF, ?ENABLED_ALL_DEF]}, {enable, [?OFFLINE_DEF]}, - {disable, [?OFFLINE_DEF]}]). + {disable, [?OFFLINE_DEF]}, + {sync, []}]). %%---------------------------------------------------------------------------- @@ -179,7 +180,13 @@ action(disable, Node, ToDisable0, Opts, PluginsFile, PluginsDir) -> ImplicitlyEnabled -- NewImplicitlyEnabled), write_enabled_plugins(PluginsFile, NewEnabled) end, - action_change(Opts, Node, ImplicitlyEnabled, NewImplicitlyEnabled). + action_change(Opts, Node, ImplicitlyEnabled, NewImplicitlyEnabled); + +action(sync, Node, X, Opts, PluginsFile, PluginsDir) -> + AllPlugins = rabbit_plugins:list(PluginsDir), + Enabled = rabbit_plugins:read_enabled(PluginsFile), + ImplicitlyEnabled = rabbit_plugins:dependencies(false, Enabled, AllPlugins), + action_change(Opts, Node, ImplicitlyEnabled, ImplicitlyEnabled). %%---------------------------------------------------------------------------- |