summaryrefslogtreecommitdiff
path: root/standalone/launcher_linux.go
diff options
context:
space:
mode:
authorRuben Pollan <meskio@sindominio.net>2019-01-09 12:49:33 +0100
committerRuben Pollan <meskio@sindominio.net>2019-01-09 12:49:33 +0100
commitf274ec2beaf060cc8bfe4f5eb6f2ce3b5c6aa1f3 (patch)
tree198930362039654cc03b50703512ce1ca6819003 /standalone/launcher_linux.go
parent9434d2534b0031c20de64ba03518aa7a150b265d (diff)
[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
Diffstat (limited to 'standalone/launcher_linux.go')
-rw-r--r--standalone/launcher_linux.go5
1 files changed, 5 insertions, 0 deletions
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) {