aboutsummaryrefslogtreecommitdiff
path: root/files/destroy_openvpn_interface
diff options
context:
space:
mode:
authorPietro Ferrari <pietro@riseup.net>2008-11-11 00:16:41 +0000
committerPietro Ferrari <pietro@riseup.net>2008-11-11 00:16:41 +0000
commitb43b2a2d5b0c424f3fce801f9158af60df20978a (patch)
treeb1e48d613ee0d76a686a83c2ccdec4f769060c89 /files/destroy_openvpn_interface
parent0a4679409748b22f464526ec2c4aad1771c80b80 (diff)
downloadpuppet-virtual-b43b2a2d5b0c424f3fce801f9158af60df20978a.tar.gz
puppet-virtual-b43b2a2d5b0c424f3fce801f9158af60df20978a.tar.bz2
merge some changes from immerda repository. specially xen related.
Diffstat (limited to 'files/destroy_openvpn_interface')
-rwxr-xr-xfiles/destroy_openvpn_interface9
1 files changed, 9 insertions, 0 deletions
diff --git a/files/destroy_openvpn_interface b/files/destroy_openvpn_interface
new file mode 100755
index 0000000..aa89ed4
--- /dev/null
+++ b/files/destroy_openvpn_interface
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+DEV="$1"
+SUBNET="$2"
+
+route del -net "$SUBNET".0 netmask 255.255.255.0 gw "$SUBNET".2
+ifconfig "$DEV" down
+openvpn --rmtun --dev "$DEV"
+