aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2017-09-27 15:33:29 +0200
committerKim Alvefur <zash@zash.se>2017-09-27 15:33:29 +0200
commit28746d6a2e125fd821489923bd95e399c19c6e78 (patch)
tree7c4e1e88b94585aed691b08127adf4ef3a4ad4d3
parenta36a90a22578a1114d4b6ae42e43a184dc314537 (diff)
downloadprosody-28746d6a2e125fd821489923bd95e399c19c6e78.tar.gz
prosody-28746d6a2e125fd821489923bd95e399c19c6e78.zip
prosody, prosodyctl: Print the actual config file name used when a problem loading it was encountered (see #990)
-rwxr-xr-xprosody4
-rwxr-xr-xprosodyctl4
2 files changed, 4 insertions, 4 deletions
diff --git a/prosody b/prosody
index da204214..635ec5f3 100755
--- a/prosody
+++ b/prosody
@@ -95,7 +95,7 @@ function read_config()
print("\n");
print("**************************");
if level == "parser" then
- print("A problem occurred while reading the config file "..(CFG_CONFIGDIR or ".").."/prosody.cfg.lua"..":");
+ print("A problem occured while reading the config file "..filename);
print("");
local err_line, err_message = tostring(err):match("%[string .-%]:(%d*): (.*)");
if err:match("chunk has too many syntax levels$") then
@@ -107,7 +107,7 @@ function read_config()
print("");
elseif level == "file" then
print("Prosody was unable to find the configuration file.");
- print("We looked for: "..(CFG_CONFIGDIR or ".").."/prosody.cfg.lua");
+ print("We looked for: "..filename);
print("A sample config file is included in the Prosody download called prosody.cfg.lua.dist");
print("Copy or rename it to prosody.cfg.lua and edit as necessary.");
end
diff --git a/prosodyctl b/prosodyctl
index 3323b169..379ccf46 100755
--- a/prosodyctl
+++ b/prosodyctl
@@ -93,13 +93,13 @@ do
print("\n");
print("**************************");
if level == "parser" then
- print("A problem occured while reading the config file "..(CFG_CONFIGDIR or ".").."/prosody.cfg.lua");
+ print("A problem occured while reading the config file "..filename);
local err_line, err_message = tostring(err):match("%[string .-%]:(%d*): (.*)");
print("Error"..(err_line and (" on line "..err_line) or "")..": "..(err_message or tostring(err)));
print("");
elseif level == "file" then
print("Prosody was unable to find the configuration file.");
- print("We looked for: "..(CFG_CONFIGDIR or ".").."/prosody.cfg.lua");
+ print("We looked for: "..filename);
print("A sample config file is included in the Prosody download called prosody.cfg.lua.dist");
print("Copy or rename it to prosody.cfg.lua and edit as necessary.");
end