Maint: openvpn configurator interface composition

This commit is contained in:
Quentin McGaw (desktop)
2021-07-26 16:03:04 +00:00
parent d5ba15c23b
commit 430512dd27
5 changed files with 37 additions and 10 deletions

View File

@@ -6,6 +6,10 @@ import (
"strings"
)
type AuthWriter interface {
WriteAuthFile(user, password string, puid, pgid int) error
}
// WriteAuthFile writes the OpenVPN auth file to disk with the right permissions.
func (c *configurator) WriteAuthFile(user, password string, puid, pgid int) error {
file, err := os.Open(c.authFilePath)