From ec4a62325a7efe5ded6b300506fb061d36161c77 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Thu, 3 Dec 2015 15:51:22 +0100 Subject: prosodyctl check: Include global options when checking "all options" --- prosodyctl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'prosodyctl') diff --git a/prosodyctl b/prosodyctl index 76c05fa6..25bfd55b 100755 --- a/prosodyctl +++ b/prosodyctl @@ -913,7 +913,7 @@ function commands.check(arg) print(" For more information see: http://prosody.im/doc/dns"); end end - local all_options = set.new(); + 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])))); end -- cgit v1.2.3 From 7483b7134a34dc6be27c469158e30e3eaa5f9457 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Thu, 3 Dec 2015 16:06:09 +0100 Subject: prosodyctl check: Really store imported LuaSec (must be a leftover from debugging) --- prosodyctl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'prosodyctl') diff --git a/prosodyctl b/prosodyctl index 25bfd55b..dcfe6930 100755 --- a/prosodyctl +++ b/prosodyctl @@ -917,7 +917,7 @@ function commands.check(arg) for host in enabled_hosts() do all_options:include(set.new(it.to_array(it.keys(config[host])))); end - local ssl = nil, dependencies.softreq"ssl"; + local ssl = dependencies.softreq"ssl"; if not ssl then if not set.intersection(all_options, set.new({"require_encryption", "c2s_require_encryption", "s2s_require_encryption"})):empty() then print(""); -- cgit v1.2.3 From 1fde24fe2cbb35a48ae2ec1701f8721470cc5938 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Thu, 3 Dec 2015 16:15:59 +0100 Subject: prosodyctl check: Point out items in the modules_enabled list that incorrectly include the 'mod_' prefix --- prosodyctl | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'prosodyctl') diff --git a/prosodyctl b/prosodyctl index dcfe6930..4826b83d 100755 --- a/prosodyctl +++ b/prosodyctl @@ -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 -- cgit v1.2.3 From b810e6f3e14ac89c4f7d4477196a81740eb9a2a3 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Thu, 3 Dec 2015 16:17:19 +0100 Subject: prosodyctl check: Point out that authentication and storage modules should not be added to modules_enabled (fixes #570) --- prosodyctl | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'prosodyctl') diff --git a/prosodyctl b/prosodyctl index 4826b83d..e4ef45ad 100755 --- a/prosodyctl +++ b/prosodyctl @@ -924,6 +924,20 @@ function commands.check(arg) print(""); print(" Modules in modules_enabled should not have the 'mod_' prefix included."); print(" Change '"..mod.."' to '"..mod:match("^mod_(.*)").."'."); + elseif mod:match("^auth_") then + print(""); + print(" Authentication modules should not be added to modules_enabled,"); + print(" but be specified in the 'authentication' option."); + print(" Remove '"..mod.."' from modules_enabled and instead add"); + print(" authentication = '"..mod:match("^auth_(.*)").."'"); + print(" For more information see https://prosody.im/doc/authentication"); + elseif mod:match("^storage_") then + print(""); + print(" storage modules should not be added to modules_enabled,"); + print(" but be specified in the 'storage' option."); + print(" Remove '"..mod.."' from modules_enabled and instead add"); + print(" storage = '"..mod:match("^storage_(.*)").."'"); + print(" For more information see https://prosody.im/doc/storage"); end end local ssl = dependencies.softreq"ssl"; -- cgit v1.2.3