diff options
author | Kim Alvefur <zash@zash.se> | 2016-01-16 22:44:43 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2016-01-16 22:44:43 +0100 |
commit | 48f8c23f4ab0e8400e20101960055eb29c4aa6f7 (patch) | |
tree | bde7b68581a288e5d3fc8a036c80502296972394 /prosodyctl | |
parent | 69f9998d1641846399e3d2818da4fd07ae05739a (diff) | |
parent | 83e7c91e0130f27720406b87996c4c74b7cc0afe (diff) | |
download | prosody-48f8c23f4ab0e8400e20101960055eb29c4aa6f7.tar.gz prosody-48f8c23f4ab0e8400e20101960055eb29c4aa6f7.zip |
Merge 0.10->trunk
Diffstat (limited to 'prosodyctl')
-rwxr-xr-x | prosodyctl | 18 |
1 files changed, 16 insertions, 2 deletions
@@ -877,6 +877,20 @@ function commands.check(arg) print(" All hosts are disabled. Remove enabled = false from at least one VirtualHost section") end end + if not config["*"].modules_enabled then + print(" No global modules_enabled is set?"); + local suggested_global_modules; + for host, options in enabled_hosts() do + if not options.component_module and options.modules_enabled then + suggested_global_modules = set.intersection(suggested_global_modules or set.new(options.modules_enabled), set.new(options.modules_enabled)); + end + end + if not suggested_global_modules:empty() then + print(" Consider moving these modules into modules_enabled in the global section:") + print(" "..tostring(suggested_global_modules / function (x) return ("%q"):format(x) end)); + end + print(); + end -- Check for global options under hosts local global_options = set.new(it.to_array(it.keys(config["*"]))); local deprecated_global_options = set.intersection(global_options, deprecated); @@ -1080,8 +1094,8 @@ function commands.check(arg) target_hosts:remove("localhost"); end - local modules = set.new(it.to_array(it.values(host_options.modules_enabled))) - + set.new(it.to_array(it.values(config.get("*", "modules_enabled")))) + local modules = set.new(it.to_array(it.values(host_options.modules_enabled or {}))) + + set.new(it.to_array(it.values(config.get("*", "modules_enabled") or {}))) + set.new({ config.get(host, "component_module") }); if modules:contains("proxy65") then |