summaryrefslogtreecommitdiff
path: root/bitmask_go/main.go
diff options
context:
space:
mode:
authorRuben Pollan <meskio@sindominio.net>2018-06-13 15:02:23 +0200
committerRuben Pollan <meskio@sindominio.net>2018-06-20 12:18:17 +0200
commitd4f013fee611299aea7f8cfff0377ba8646ba17d (patch)
tree05c20f5aeacdd088e0d7e209b99f2d87294fa783 /bitmask_go/main.go
parent9f6a017b93569f5abe0ef2aeb22efb05fd0e99a7 (diff)
[feat] do a proper openvpn process management
Diffstat (limited to 'bitmask_go/main.go')
-rw-r--r--bitmask_go/main.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/bitmask_go/main.go b/bitmask_go/main.go
index 49f803a..6b60d43 100644
--- a/bitmask_go/main.go
+++ b/bitmask_go/main.go
@@ -28,6 +28,7 @@ type Bitmask struct {
tempdir string
statusCh chan string
managementClient *openvpn.MgmtClient
+ launch *launcher
}
// Init the connection to bitmask
@@ -37,7 +38,8 @@ func Init() (*Bitmask, error) {
if err != nil {
return nil, err
}
- b := Bitmask{tempdir, statusCh, nil}
+ launch := newLauncher()
+ b := Bitmask{tempdir, statusCh, nil, launch}
err = b.StopVPN()
if err != nil {