summaryrefslogtreecommitdiff
path: root/pkg/vpn/launcher_linux.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/vpn/launcher_linux.go')
-rw-r--r--pkg/vpn/launcher_linux.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/pkg/vpn/launcher_linux.go b/pkg/vpn/launcher_linux.go
index 3e872cd..52c87f7 100644
--- a/pkg/vpn/launcher_linux.go
+++ b/pkg/vpn/launcher_linux.go
@@ -39,10 +39,11 @@ var bitmaskRootPaths = []string{
type launcher struct {
openvpnCh chan []string
+ failed bool
}
func newLauncher() (*launcher, error) {
- l := launcher{make(chan []string, 1)}
+ l := launcher{make(chan []string, 1), false}
go l.openvpnRunner()
return &l, nil
}
@@ -139,7 +140,7 @@ func getPolkitPath() string {
// now we get weird
"/usr/libexec/policykit-1-pantheon/pantheon-agent-polkit",
"/usr/lib/polkit-1-dde/dde-polkit-agent",
- // do you know some we"re still missing? :)
+ // do you know some we"re still missing? please send a merge request :)
}
for _, polkit := range polkitPaths {
@@ -191,6 +192,8 @@ func (l *launcher) openvpnRunner(arg ...string) {
err := runBitmaskRoot(arg...)
if err != nil {
log.Printf("An error ocurred running openvpn: %v", err)
+ l.openvpnCh <- nil
+ l.failed = true
}
}
}