summaryrefslogtreecommitdiff
path: root/pkg/systray/run.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/systray/run.go')
-rw-r--r--pkg/systray/run.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/pkg/systray/run.go b/pkg/systray/run.go
index 2a513d8..2878928 100644
--- a/pkg/systray/run.go
+++ b/pkg/systray/run.go
@@ -51,7 +51,12 @@ func initialize(conf *Config, bt *bmTray) {
go checkAndStartBitmask(b, notify, conf)
go listenSignals(b)
- as := bitmask.NewAutostart(config.ApplicationName, getIconPath())
+ var as bitmask.Autostart
+ if conf.DisableAustostart {
+ as = &bitmask.DummyAutostart{}
+ } else {
+ as = bitmask.NewAutostart(config.ApplicationName, getIconPath())
+ }
err = as.Enable()
if err != nil {
log.Printf("Error enabling autostart: %v", err)
@@ -93,7 +98,7 @@ func checkAndInstallHelpers(b bitmask.Bitmask, notify *notificator) error {
}
func maybeStartVPN(b bitmask.Bitmask, conf *Config) error {
- if conf.UserStoppedVPN {
+ if conf.wasUserStopped() {
return nil
}