Mercurial > prosody-hg
diff plugins/mod_http.lua @ 11066:dc41c8dfd2b1
mod_http: Silence warnings when running under prosodyctl
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Fri, 11 Sep 2020 12:37:07 +0100 |
| parents | 3e5bc34be734 |
| children | a0477656258c |
line wrap: on
line diff
--- a/plugins/mod_http.lua Wed Sep 09 17:12:00 2020 +0100 +++ b/plugins/mod_http.lua Fri Sep 11 12:37:07 2020 +0100 @@ -93,7 +93,9 @@ 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 @@ 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
