Fatal container exit if openvpn or unbound exits
This commit is contained in:
@@ -8,10 +8,10 @@ import (
|
||||
"github.com/qdm12/private-internet-access-docker/internal/constants"
|
||||
)
|
||||
|
||||
func (c *configurator) Start() (stdout io.ReadCloser, err error) {
|
||||
func (c *configurator) Start() (stdout io.ReadCloser, waitFn func() error, err error) {
|
||||
c.logger.Info("%s: starting openvpn", logPrefix)
|
||||
stdout, _, _, err = c.commander.Start("openvpn", "--config", string(constants.OpenVPNConf))
|
||||
return stdout, err
|
||||
stdout, _, waitFn, err = c.commander.Start("openvpn", "--config", string(constants.OpenVPNConf))
|
||||
return stdout, waitFn, err
|
||||
}
|
||||
|
||||
func (c *configurator) Version() (string, error) {
|
||||
|
||||
@@ -17,7 +17,7 @@ type Configurator interface {
|
||||
WriteAuthFile(user, password string, uid, gid int) error
|
||||
CheckTUN() error
|
||||
CreateTUN() error
|
||||
Start() (stdout io.ReadCloser, err error)
|
||||
Start() (stdout io.ReadCloser, waitFn func() error, err error)
|
||||
}
|
||||
|
||||
type configurator struct {
|
||||
|
||||
Reference in New Issue
Block a user