From fa08af4697c14c5a365ed7ec2b2dce3f67386d49 Mon Sep 17 00:00:00 2001 From: Ruben Pollan Date: Mon, 9 Jul 2018 23:34:14 +0200 Subject: [feat] autostart the standalone systray if the vpn was on - Resolves: #8 --- main.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'main.go') 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) { -- cgit v1.2.3