From 42d2350e4a5d7a5bfb204bdc0994a0c283208fe7 Mon Sep 17 00:00:00 2001 From: Jeroen Wijenbergh Date: Tue, 19 Apr 2022 12:56:57 +0200 Subject: Config: Only write on deregister --- src/state.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/state.go') 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 -- cgit v1.2.3