summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSimon MacMullen <simon@rabbitmq.com>2014-06-09 18:08:16 +0100
committerSimon MacMullen <simon@rabbitmq.com>2014-06-09 18:08:16 +0100
commit85188c32ccb997b59f3b50092ef192fbc6608a1b (patch)
treead50a05848efba00b337c64ae2e119aae78a026c /src
parent23b7693b359ae58db7e9b7f04b8d29e2963c6317 (diff)
downloadrabbitmq-server-git-85188c32ccb997b59f3b50092ef192fbc6608a1b.tar.gz
Add (deliberately) undocumented feature to just trigger the sync without updating the config file.
Diffstat (limited to 'src')
-rw-r--r--src/rabbit_plugins_main.erl11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/rabbit_plugins_main.erl b/src/rabbit_plugins_main.erl
index 78313eee26..d655e714ee 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).
%%----------------------------------------------------------------------------