diff options
author | Kim Alvefur <zash@zash.se> | 2025-01-18 12:31:48 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2025-01-18 12:31:48 +0100 |
commit | 059d6457e0a03a4990319a08924a0d9c71b82468 (patch) | |
tree | 12101da657596e7fc63e616e114f5813e7c4b59b /core/configmanager.lua | |
parent | 41a360ce2af69f1fbb7f9f53506794794c858f11 (diff) | |
download | prosody-059d6457e0a03a4990319a08924a0d9c71b82468.tar.gz prosody-059d6457e0a03a4990319a08924a0d9c71b82468.zip |
core.configmanager: Rename Secret to Credential
To match the variable name and what systemd calls them.
Diffstat (limited to 'core/configmanager.lua')
-rw-r--r-- | core/configmanager.lua | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/core/configmanager.lua b/core/configmanager.lua index 922ff05f..1da50ae5 100644 --- a/core/configmanager.lua +++ b/core/configmanager.lua @@ -199,6 +199,7 @@ do FileLine = true, FileLines = true, Secret = true, + Credential = true, Include = true, include = true, RunScript = true }, { __index = function (_, k) if k:match("^ENV_") then @@ -361,17 +362,18 @@ do env.FileLines = linereader(config_path); if _G.prosody.paths.secrets then - env.Secret = filereader(_G.prosody.paths.secrets, "*a"); + env.Credential = filereader(_G.prosody.paths.secrets, "*a"); elseif _G.prosody.process_type == "prosody" then - env.Secret = function() error("Secret() requires the $CREDENTIALS_DIRECTORY environment variable to be set", 2) end + env.Credential = function() error("Credential() requires the $CREDENTIALS_DIRECTORY environment variable to be set", 2) end else - env.Secret = function() - t_insert(warnings, ("%s:%d: Secret() requires the $CREDENTIALS_DIRECTORY environment variable to be set") + env.Credential = function() + t_insert(warnings, ("%s:%d: Credential() requires the $CREDENTIALS_DIRECTORY environment variable to be set") :format(config_file, get_line_number(config_file))); return nil; end end + env.Secret = env.Credential; -- COMPAT remove after all the early adopters s/Secret/Credential/ local chunk, err = envload(data, "@"..config_file, env); |