From f274ec2beaf060cc8bfe4f5eb6f2ce3b5c6aa1f3 Mon Sep 17 00:00:00 2001 From: Ruben Pollan Date: Wed, 9 Jan 2019 12:49:33 +0100 Subject: [feat] use firewall status to check if the vpn is in failed status If openvpn is off, but the firewall is up, we are in a fail-close status and we should report it properly. - Resolves: #97 --- standalone/launcher_linux.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'standalone/launcher_linux.go') diff --git a/standalone/launcher_linux.go b/standalone/launcher_linux.go index a434ecd..5266fa1 100644 --- a/standalone/launcher_linux.go +++ b/standalone/launcher_linux.go @@ -75,6 +75,11 @@ func (l *launcher) firewallStop() error { return runBitmaskRoot("firewall", "stop") } +func (l *launcher) firewallIsUp() bool { + err := runBitmaskRoot("firewall", "isup") + return err == nil +} + func (l *launcher) openvpnRunner(arg ...string) { running := false runOpenvpn := func(arg []string) { -- cgit v1.2.3