Fix: chown openvpn configuration file

This commit is contained in:
Quentin McGaw (desktop)
2021-08-18 15:47:11 +00:00
parent 5140a7b010
commit 97340ec70b

View File

@@ -16,7 +16,15 @@ func (c *configurator) WriteConfig(lines []string) error {
}
_, err = file.WriteString(strings.Join(lines, "\n"))
if err != nil {
_ = file.Close()
return err
}
err = file.Chown(c.puid, c.pgid)
if err != nil {
_ = file.Close()
return err
}
return file.Close()
}