diff options
Diffstat (limited to 'util/startup.lua')
-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; |