Skip to content
Snippets Groups Projects
Unverified Commit fc057460 authored by meskio's avatar meskio :tent:
Browse files

[bug] start VPN automatically on first launch

When there was no configuration file the 'conf.StartVPN' was set tu
false. Let's set it properly even if there is no config file.

- Resolves: #128
parent 75bb409f
No related branches found
No related tags found
1 merge request!68[bug] start VPN automatically on first launch
......@@ -57,12 +57,11 @@ func ParseConfig() *Config {
f, err := os.Open(configPath)
if err != nil {
conf.save()
return &conf
} else {
defer f.Close()
dec := json.NewDecoder(f)
err = dec.Decode(&conf.file)
}
defer f.Close()
dec := json.NewDecoder(f)
err = dec.Decode(&conf.file)
conf.SelectGateway = conf.file.SelectGateway
conf.DisableAustostart = conf.file.DisableAustostart
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment