diff options
author | Kim Alvefur <zash@zash.se> | 2015-12-03 16:15:59 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2015-12-03 16:15:59 +0100 |
commit | 8b1307505620b3083a8efaf3f7ead3f174e5f539 (patch) | |
tree | 575d77fed5db2b979ae093c1dfc967409b79a400 | |
parent | 061bdb54e067a8188bd0c10f2ad1a7de9f58a99e (diff) | |
download | prosody-8b1307505620b3083a8efaf3f7ead3f174e5f539.tar.gz prosody-8b1307505620b3083a8efaf3f7ead3f174e5f539.zip |
prosodyctl check: Point out items in the modules_enabled list that incorrectly include the 'mod_' prefix
-rwxr-xr-x | prosodyctl | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -913,9 +913,18 @@ function commands.check(arg) print(" For more information see: http://prosody.im/doc/dns"); end end + local all_modules = set.new(config["*"].modules_enabled); local all_options = set.new(it.to_array(it.keys(config["*"]))); for host in enabled_hosts() do all_options:include(set.new(it.to_array(it.keys(config[host])))); + all_modules:include(set.new(config[host].modules_enabled)); + end + for mod in all_modules do + if mod:match("^mod_") then + print(""); + print(" Modules in modules_enabled should not have the 'mod_' prefix included."); + print(" Change '"..mod.."' to '"..mod:match("^mod_(.*)").."'."); + end end local ssl = dependencies.softreq"ssl"; if not ssl then |