summaryrefslogtreecommitdiff
path: root/cmd/bitmask-vpn
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/bitmask-vpn')
-rw-r--r--cmd/bitmask-vpn/main.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/cmd/bitmask-vpn/main.go b/cmd/bitmask-vpn/main.go
index ad85b0e..77ace31 100644
--- a/cmd/bitmask-vpn/main.go
+++ b/cmd/bitmask-vpn/main.go
@@ -51,12 +51,20 @@ func main() {
selectGateway := flag.Bool("select-gateway", false, "Enable gateway selection")
disableAutostart := flag.Bool("disable-autostart", false, "Disable the autostart for the next run")
+ startVPN := flag.String("start-vpn", "", "Start the vpn in turned 'on' or 'off'")
versionFlag := flag.Bool("version", false, "Version of the bitmask-systray")
flag.Parse()
if *versionFlag {
fmt.Println(version)
os.Exit(0)
}
+ if *startVPN != "" {
+ if *startVPN != "on" && *startVPN != "off" {
+ fmt.Println("-start-vpn should be 'on' or 'off'")
+ os.Exit(1)
+ }
+ conf.StartVPN = *startVPN == "on"
+ }
if *selectGateway {
conf.SelectGateway = *selectGateway
}