aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2022-03-28 11:42:16 +0100
committerMatthew Wild <mwild1@gmail.com>2022-03-28 11:42:16 +0100
commit6a923e65c9a4f1129a448e7c41335d20e375be34 (patch)
tree9821b4a3652e9dd4a03f1f5397607900a55d8b55
parent9d8fc066bdfcf38eb9f77b1c05a43bde3048e1ab (diff)
parentfdd5f22b8ac4960bed70380c018ed08f6702a71e (diff)
downloadprosody-6a923e65c9a4f1129a448e7c41335d20e375be34.tar.gz
prosody-6a923e65c9a4f1129a448e7c41335d20e375be34.zip
Merge 0.12->trunk
-rw-r--r--core/configmanager.lua7
-rw-r--r--util/prosodyctl/check.lua7
2 files changed, 14 insertions, 0 deletions
diff --git a/core/configmanager.lua b/core/configmanager.lua
index a379ecea..4cd7c9d6 100644
--- a/core/configmanager.lua
+++ b/core/configmanager.lua
@@ -31,6 +31,7 @@ local parser = nil;
local config_mt = { __index = function (t, _) return rawget(t, "*"); end};
local config = setmetatable({ ["*"] = { } }, config_mt);
+local files = {};
-- When host not found, use global
local host_mt = { __index = function(_, k) return config["*"][k] end }
@@ -98,6 +99,10 @@ function _M.load(filename, config_format)
end
end
+function _M.files()
+ return files;
+end
+
-- Built-in Lua parser
do
local pcall = _G.pcall;
@@ -253,6 +258,8 @@ do
return nil, err;
end
+ t_insert(files, config_file);
+
return true, warnings;
end
diff --git a/util/prosodyctl/check.lua b/util/prosodyctl/check.lua
index e6b815f2..4b09ad8d 100644
--- a/util/prosodyctl/check.lua
+++ b/util/prosodyctl/check.lua
@@ -332,6 +332,13 @@ local function check(arg)
end
if not what or what == "config" then
print("Checking config...");
+
+ if what == "config" then
+ local files = configmanager.files();
+ print(" The following configuration files have been loaded:");
+ print(" - "..table.concat(files, "\n - "));
+ end
+
local obsolete = set.new({ --> remove
"archive_cleanup_interval",
"cross_domain_bosh",