aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
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
commit29f2e5906fab2bc82b04041a1e29399d044a662f (patch)
tree3bfc1de691ad7685c6b28da19db2c820b18a5772 /plugins
parent686adb2d713f0a1b5f8ec27221fcf00f6ece886f (diff)
downloadprosody-29f2e5906fab2bc82b04041a1e29399d044a662f.tar.gz
prosody-29f2e5906fab2bc82b04041a1e29399d044a662f.zip
mod_http: Silence warnings when running under prosodyctl
Diffstat (limited to 'plugins')
-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