# HG changeset patch # User Matthew Wild # Date 1599824227 -3600 # Node ID dc41c8dfd2b1d9b3f7156fd781b1e567d622fd62 # Parent 95eb1a981ef674849d8008f6ef8bdf3ce9c51a9f mod_http: Silence warnings when running under prosodyctl diff -r 95eb1a981ef6 -r dc41c8dfd2b1 plugins/mod_http.lua --- 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