diff options
author | Kim Alvefur <zash@zash.se> | 2018-05-11 16:03:35 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2018-05-11 16:03:35 +0200 |
commit | c588aa8ce084cfa9a5d7f4a3eef55747e6218e2b (patch) | |
tree | d5c604a18c9aebcce5f38b6967be88159ba8f357 | |
parent | 570de19e9991c9b3a0844e639403f3c9abcd77f6 (diff) | |
download | prosody-c588aa8ce084cfa9a5d7f4a3eef55747e6218e2b.tar.gz prosody-c588aa8ce084cfa9a5d7f4a3eef55747e6218e2b.zip |
prosodyctl: Config check for modules that are also components (fixes #1138)
-rwxr-xr-x | prosodyctl | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -838,6 +838,19 @@ function commands.check(arg) end print(); end + + do -- Check for modules enabled both normally and as components + local modules = set.new(config["*"]["modules_enabled"]); + for host, options in enabled_hosts() do + local component_module = options.component_module; + if component_module and modules:contains(component_module) then + print((" mod_%s is enabled both in modules_enabled and as Component %q %q"):format(component_module, host, component_module)); + print(" This means the service is enabled on all VirtualHosts as well as the Component."); + print(" Are you sure this what you want? It may cause unexpected behaviour."); + end + end + 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); |