aboutsummaryrefslogtreecommitdiffstats
path: root/util/startup.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2019-06-10 13:22:22 +0200
committerKim Alvefur <zash@zash.se>2019-06-10 13:22:22 +0200
commit0269157c4511472cf0bf377d84f6e99876f83d12 (patch)
tree8cd84a76fb673cbfefa00ba1516bd16150f1c780 /util/startup.lua
parenta4764762b3dad679f40dadd6eb2eb31ea1d5cace (diff)
parent9a5a3fd0f10693e6cba2779095398614eb94e68c (diff)
downloadprosody-0269157c4511472cf0bf377d84f6e99876f83d12.tar.gz
prosody-0269157c4511472cf0bf377d84f6e99876f83d12.zip
Merge 0.11->trunk
Diffstat (limited to 'util/startup.lua')
-rw-r--r--util/startup.lua14
1 files changed, 11 insertions, 3 deletions
diff --git a/util/startup.lua b/util/startup.lua
index c101c290..7a1a95aa 100644
--- a/util/startup.lua
+++ b/util/startup.lua
@@ -7,6 +7,7 @@ local logger = require "util.logger";
local log = logger.init("startup");
local config = require "core.configmanager";
+local config_warnings;
local dependencies = require "util.dependencies";
@@ -64,6 +65,8 @@ function startup.read_config()
print("**************************");
print("");
os.exit(1);
+ elseif err and #err > 0 then
+ config_warnings = err;
end
prosody.config_loaded = true;
end
@@ -96,8 +99,13 @@ function startup.init_logging()
end);
end
-function startup.log_dependency_warnings()
+function startup.log_startup_warnings()
dependencies.log_warnings();
+ if config_warnings then
+ for _, warning in ipairs(config_warnings) do
+ log("warn", "Configuration warning: %s", warning);
+ end
+ end
end
function startup.sanity_check()
@@ -518,7 +526,7 @@ function startup.prosodyctl()
startup.read_version();
startup.switch_user();
startup.check_dependencies();
- startup.log_dependency_warnings();
+ startup.log_startup_warnings();
startup.check_unwriteable();
startup.load_libraries();
startup.init_http_client();
@@ -543,7 +551,7 @@ function startup.prosody()
startup.add_global_prosody_functions();
startup.read_version();
startup.log_greeting();
- startup.log_dependency_warnings();
+ startup.log_startup_warnings();
startup.load_secondary_libraries();
startup.init_http_client();
startup.init_data_store();