diff options
author | Kim Alvefur <zash@zash.se> | 2025-02-22 00:26:35 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2025-02-22 00:26:35 +0100 |
commit | 263b7e1e16af812cd93e9330b5ace13d7a3c1a47 (patch) | |
tree | 77d4c4f0717e7e4cfd3b377234135ab4598c6984 /util | |
parent | bde377c10a9ea3bb897a5e8dc1b1f360440acb1e (diff) | |
parent | 6b1e05614238b1ceb0fb640ee4241697e10db638 (diff) | |
download | prosody-263b7e1e16af812cd93e9330b5ace13d7a3c1a47.tar.gz prosody-263b7e1e16af812cd93e9330b5ace13d7a3c1a47.zip |
Merge 13.0->trunk
Diffstat (limited to 'util')
-rw-r--r-- | util/startup.lua | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/util/startup.lua b/util/startup.lua index 34c2f733..15f07fdf 100644 --- a/util/startup.lua +++ b/util/startup.lua @@ -89,6 +89,14 @@ function startup.read_config() end end prosody.config_file = filename + local credentials_directory = os.getenv("CREDENTIALS_DIRECTORY"); + if credentials_directory then + config.set_credentials_directory(credentials_directory); + elseif prosody.process_type == "prosody" then + config.set_credential_fallback_mode("error"); + else + config.set_credential_fallback_mode("warn"); + end local ok, level, err = config.load(filename); if not ok then print("\n"); @@ -271,7 +279,6 @@ function startup.init_global_state() config = CFG_CONFIGDIR or "."; plugins = CFG_PLUGINDIR or "plugins"; data = "data"; - credentials = os.getenv("CREDENTIALS_DIRECTORY"); }; prosody.arg = _G.arg; |