summaryrefslogtreecommitdiff
path: root/src/state.go
diff options
context:
space:
mode:
authorJeroen Wijenbergh <jeroenwijenbergh@protonmail.com>2022-04-19 12:56:57 +0200
committerjwijenbergh <jeroenwijenbergh@protonmail.com>2022-04-19 12:56:57 +0200
commit42d2350e4a5d7a5bfb204bdc0994a0c283208fe7 (patch)
treeafa65e83d983c7d5c9015cf480f5155e704c278e /src/state.go
parentfb2f57cfcbb6408130e1cc75bd36c896502b78e0 (diff)
Config: Only write on deregister
Diffstat (limited to 'src/state.go')
-rw-r--r--src/state.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/state.go b/src/state.go
index 23bc1cd..1eb8ebd 100644
--- a/src/state.go
+++ b/src/state.go
@@ -61,6 +61,10 @@ func (state *VPNState) Deregister() error {
// Close the log file
state.CloseLog()
+ // Write the config
+ state.WriteConfig()
+
+ // Re-initialize the server and FSM
state.Server = &Server{}
state.InitializeFSM()
return nil