diff options
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -17,6 +17,7 @@ package main import ( "log" + "os" "0xacab.org/leap/bitmask-systray/bitmask" "github.com/jmshal/go-locale" @@ -48,15 +49,18 @@ func main() { return } defer b.Close() + go checkAndStartBitmask(b, notify, conf) - err = checkAndInstallHelpers(b, notify) + run(b, conf) +} + +func checkAndStartBitmask(b *bitmask.Bitmask, notify *notificator, conf *systrayConfig) { + err := checkAndInstallHelpers(b, notify) if err != nil { log.Printf("Is bitmask running? %v", err) - return + os.Exit(1) } maybeStartVPN(b, conf) - - run(b, conf) } func checkAndInstallHelpers(b *bitmask.Bitmask, notify *notificator) error { |