Software /
code /
prosody
Comparison
prosodyctl @ 6959:aa8647a5105d
prosodyctl check: Point out items in the modules_enabled list that incorrectly include the 'mod_' prefix
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 03 Dec 2015 16:15:59 +0100 |
parent | 6958:ebac87d80ef4 |
child | 6960:50e2277ea05f |
comparison
equal
deleted
inserted
replaced
6958:ebac87d80ef4 | 6959:aa8647a5105d |
---|---|
911 print(" Suggestion: If "..host.. " is a new host with no real users yet, consider renaming it now to"); | 911 print(" Suggestion: If "..host.. " is a new host with no real users yet, consider renaming it now to"); |
912 print(" "..host:gsub("^[^.]+%.", "")..". You can use SRV records to redirect XMPP clients and servers to "..host.."."); | 912 print(" "..host:gsub("^[^.]+%.", "")..". You can use SRV records to redirect XMPP clients and servers to "..host.."."); |
913 print(" For more information see: http://prosody.im/doc/dns"); | 913 print(" For more information see: http://prosody.im/doc/dns"); |
914 end | 914 end |
915 end | 915 end |
916 local all_modules = set.new(config["*"].modules_enabled); | |
916 local all_options = set.new(it.to_array(it.keys(config["*"]))); | 917 local all_options = set.new(it.to_array(it.keys(config["*"]))); |
917 for host in enabled_hosts() do | 918 for host in enabled_hosts() do |
918 all_options:include(set.new(it.to_array(it.keys(config[host])))); | 919 all_options:include(set.new(it.to_array(it.keys(config[host])))); |
920 all_modules:include(set.new(config[host].modules_enabled)); | |
921 end | |
922 for mod in all_modules do | |
923 if mod:match("^mod_") then | |
924 print(""); | |
925 print(" Modules in modules_enabled should not have the 'mod_' prefix included."); | |
926 print(" Change '"..mod.."' to '"..mod:match("^mod_(.*)").."'."); | |
927 end | |
919 end | 928 end |
920 local ssl = dependencies.softreq"ssl"; | 929 local ssl = dependencies.softreq"ssl"; |
921 if not ssl then | 930 if not ssl then |
922 if not set.intersection(all_options, set.new({"require_encryption", "c2s_require_encryption", "s2s_require_encryption"})):empty() then | 931 if not set.intersection(all_options, set.new({"require_encryption", "c2s_require_encryption", "s2s_require_encryption"})):empty() then |
923 print(""); | 932 print(""); |