summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorRuben Pollan <meskio@sindominio.net>2018-04-12 12:46:47 +0200
committerRuben Pollan <meskio@sindominio.net>2018-04-19 22:58:45 +0200
commit32f589c45d9b25a52877875f05fa4f59509458a2 (patch)
tree9d94469603914a01861975f4b3548bafabd1ca1f /main.go
parenta45d99f2dd4d3694160580184f0573a15c06708f (diff)
[feat] Ask for donations
- Resolves: #24
Diffstat (limited to 'main.go')
-rw-r--r--main.go12
1 files changed, 8 insertions, 4 deletions
diff --git a/main.go b/main.go
index e8fa740..d3b540d 100644
--- a/main.go
+++ b/main.go
@@ -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 {