From 29f2e5906fab2bc82b04041a1e29399d044a662f Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Fri, 11 Sep 2020 12:37:07 +0100 Subject: mod_http: Silence warnings when running under prosodyctl --- plugins/mod_http.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'plugins') 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 -- cgit v1.2.3