# HG changeset patch # User Kim Alvefur # Date 1452638850 -3600 # Node ID 8b590fc77d91c013c0ebf3c69023bc69710695cb # Parent a22d6a46d2ed2ea8fc821d650e73fea51f2b3584 prosodyctl: check config: Suggest moving modules enabled on all hosts to a global_modules enabled if that is unset diff -r a22d6a46d2ed -r 8b590fc77d91 prosodyctl --- a/prosodyctl Fri Jan 15 00:51:01 2016 +0000 +++ b/prosodyctl Tue Jan 12 23:47:30 2016 +0100 @@ -877,6 +877,20 @@ 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);