prosodyctl: Point out how default_storage is redundant if storage is a string
authorKim Alvefur <zash@zash.se>
Sat, 08 Apr 2017 16:42:42 +0200
changeset 8070 91550b6f93d2
parent 8069 5eec340c75fb
child 8071 5abb6bc45edd
child 8072 8f5f197b139d
prosodyctl: Point out how default_storage is redundant if storage is a string
prosodyctl
--- a/prosodyctl	Sat Apr 08 16:33:42 2017 +0200
+++ b/prosodyctl	Sat Apr 08 16:42:42 2017 +0200
@@ -973,6 +973,13 @@
 				print("    For more information see https://prosody.im/doc/storage");
 			end
 		end
+		for host, config in pairs(config) do
+			if type(rawget(config, "storage")) == "string" and rawget(config, "default_storage") then
+				print("");
+				print("    The 'default_storage' option is not needed if 'storage' is set to a string.");
+				break;
+			end
+		end
 		local require_encryption = set.intersection(all_options, set.new({"require_encryption", "c2s_require_encryption", "s2s_require_encryption"})):empty();
 		local ssl = dependencies.softreq"ssl";
 		if not ssl then