summaryrefslogtreecommitdiff
path: root/debian/openvpn.if-down.d
diff options
context:
space:
mode:
Diffstat (limited to 'debian/openvpn.if-down.d')
-rw-r--r--debian/openvpn.if-down.d13
1 files changed, 13 insertions, 0 deletions
diff --git a/debian/openvpn.if-down.d b/debian/openvpn.if-down.d
new file mode 100644
index 0000000..4610786
--- /dev/null
+++ b/debian/openvpn.if-down.d
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+OPENVPN=/etc/init.d/openvpn
+
+if [ ! -x $OPENVPN ]; then
+ exit 0
+fi
+
+if [ -n "$IF_OPENVPN" ]; then
+ for vpn in $IF_OPENVPN; do
+ $OPENVPN stop $vpn
+ done
+fi