summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorRuben Pollan <meskio@sindominio.net>2018-07-09 23:34:14 +0200
committerRuben Pollan <meskio@sindominio.net>2018-07-10 13:03:30 +0200
commitfa08af4697c14c5a365ed7ec2b2dce3f67386d49 (patch)
tree2ae1eb50401b3a2b2104444275cabdd31f4d3619 /main.go
parent2ac0be0c3f431bdefe99b29ab83f3b3c8bd9ea78 (diff)
[feat] autostart the standalone systray if the vpn was on
- Resolves: #8
Diffstat (limited to 'main.go')
-rw-r--r--main.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/main.go b/main.go
index 75745da..7ce0ba3 100644
--- a/main.go
+++ b/main.go
@@ -81,7 +81,12 @@ func main() {
defer b.Close()
go checkAndStartBitmask(b, notify, conf)
- run(b, conf, notify)
+ as := newAutostart(applicationName, getIconPath())
+ err = as.Enable()
+ if err != nil {
+ log.Printf("Error enabling autostart: %v", err)
+ }
+ run(b, conf, notify, as)
}
func checkAndStartBitmask(b bitmask.Bitmask, notify *notificator, conf *systrayConfig) {