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 | 85188c32ccb997b59f3b50092ef192fbc6608a1b (patch) | |
| tree | ad50a05848efba00b337c64ae2e119aae78a026c | |
| parent | 23b7693b359ae58db7e9b7f04b8d29e2963c6317 (diff) | |
| download | rabbitmq-server-git-85188c32ccb997b59f3b50092ef192fbc6608a1b.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 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). %%---------------------------------------------------------------------------- |
