diff options
author | kali kaneko (leap communications) <kali@leap.se> | 2020-06-17 19:40:24 +0200 |
---|---|---|
committer | kali kaneko (leap communications) <kali@leap.se> | 2020-06-26 12:13:43 +0200 |
commit | 9b8009cfaf6707d23a20494cd5467aed9c98513b (patch) | |
tree | 427ae34f6c32ba1dd4e182ac1def70c700b27e86 /pkg/backend/actions.go | |
parent | 2bcaa8e89c2e76c2d14cf9f7f029e17d46c91e0f (diff) |
[feat] cleanup temp dirs on quit
Diffstat (limited to 'pkg/backend/actions.go')
-rw-r--r-- | pkg/backend/actions.go | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/pkg/backend/actions.go b/pkg/backend/actions.go new file mode 100644 index 0000000..725a550 --- /dev/null +++ b/pkg/backend/actions.go @@ -0,0 +1,21 @@ +package backend + +import ( + "log" + "os" +) + +func startVPN() { + err := ctx.bm.StartVPN(ctx.Provider) + if err != nil { + log.Println(err) + os.Exit(1) + } +} + +func stopVPN() { + err := ctx.bm.StopVPN() + if err != nil { + log.Println(err) + } +} |