Maint: OpenVPN: only add persist-key when running without root

This commit is contained in:
Quentin McGaw (desktop)
2021-09-14 14:55:39 +00:00
parent 2ab05b9350
commit af3f882bb8
19 changed files with 20 additions and 17 deletions

View File

@@ -22,7 +22,6 @@ func (i *Ipvanish) BuildConf(connection models.Connection,
"client",
"dev " + settings.Interface,
"nobind",
"persist-key",
"tls-exit",
// Ipvanish specific
@@ -53,6 +52,7 @@ func (i *Ipvanish) BuildConf(connection models.Connection,
if !settings.Root {
lines = append(lines, "user "+settings.ProcUser)
lines = append(lines, "persist-tun")
lines = append(lines, "persist-key")
}
if !settings.IPv6 {