feat(openvpn): OPENVPN_PROCESS_USER and deprecates OPENVPN_ROOT

This commit is contained in:
Quentin McGaw
2022-01-27 23:34:19 +00:00
parent 1b585159d1
commit 7a8f5f53d5
26 changed files with 80 additions and 82 deletions

View File

@@ -88,8 +88,8 @@ func modifyConfig(lines []string, connection models.Connection,
modified = append(modified, `pull-filter ignore "route-ipv6"`)
modified = append(modified, `pull-filter ignore "ifconfig-ipv6"`)
}
if !*settings.Root {
modified = append(modified, "user "+settings.ProcUser)
if settings.ProcessUser != "root" {
modified = append(modified, "user "+settings.ProcessUser)
modified = append(modified, "persist-tun")
modified = append(modified, "persist-key")
}