aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2020-09-11 12:37:07 +0100
committerMatthew Wild <mwild1@gmail.com>2020-09-11 12:37:07 +0100
commite6866e4df85c88862923347b818ef417b4dd36c5 (patch)
tree3bfc1de691ad7685c6b28da19db2c820b18a5772
parent86acb2276c938f80b66799284ced24589576d6c0 (diff)
downloadprosody-e6866e4df85c88862923347b818ef417b4dd36c5.tar.gz
prosody-e6866e4df85c88862923347b818ef417b4dd36c5.zip
mod_http: Silence warnings when running under prosodyctl
-rw-r--r--plugins/mod_http.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/mod_http.lua b/plugins/mod_http.lua
index 1248a06c..84e2d18f 100644
--- a/plugins/mod_http.lua
+++ b/plugins/mod_http.lua
@@ -93,7 +93,9 @@ function moduleapi.http_url(module, app_name, default_path)
return url_build(url);
end
end
- module:log("warn", "No http ports enabled, can't generate an external URL");
+ if prosody.process_type == "prosody" then
+ module:log("warn", "No http ports enabled, can't generate an external URL");
+ end
return "http://disabled.invalid/";
end
@@ -190,7 +192,7 @@ function module.add_host(module)
local services = portmanager.get_active_services();
if services:get("https") or services:get("http") then
module:log("info", "Serving '%s' at %s", app_name, module:http_url(app_name, app_path));
- else
+ elseif prosody.process_type == "prosody" then
module:log("warn", "Not listening on any ports, '%s' will be unreachable", app_name);
end
end