Change: PASSWORD changed to OPENVPN_PASSWORD

This commit is contained in:
Quentin McGaw
2020-12-29 20:05:17 +00:00
parent d556db079b
commit 96f2b2b617
4 changed files with 17 additions and 13 deletions

View File

@@ -19,11 +19,15 @@ func (r *reader) GetUser() (user string, err error) {
// GetPassword obtains the password to use to connect to the VPN servers.
func (r *reader) GetPassword(required bool) (s string, err error) {
options := []libparams.GetEnvSetter{libparams.CaseSensitiveValue(), libparams.Unset()}
options := []libparams.GetEnvSetter{
libparams.CaseSensitiveValue(),
libparams.Unset(),
libparams.RetroKeys([]string{"PASSWORD"}, r.onRetroActive),
}
if required {
options = append(options, libparams.Compulsory())
}
return r.envParams.GetEnv("PASSWORD", options...)
return r.envParams.GetEnv("OPENVPN_PASSWORD", options...)
}
// GetNetworkProtocol obtains the network protocol to use to connect to the