aboutsummaryrefslogtreecommitdiff
path: root/files/vserver/destroy_openvpn_interface
diff options
context:
space:
mode:
authorPietro Ferrari <pietro@riseup.net>2008-11-11 18:26:57 +0000
committerPietro Ferrari <pietro@riseup.net>2008-11-12 01:06:16 +0000
commit0f35e2058fddc5aee3c41057ddec1844d2a80c4c (patch)
treea37634fb943bac8449741e5dace001dadb18dcef /files/vserver/destroy_openvpn_interface
parent0fdfc7d93be57eac136d2101f78d0d95d53e27af (diff)
downloadpuppet-virtual-0f35e2058fddc5aee3c41057ddec1844d2a80c4c.tar.gz
puppet-virtual-0f35e2058fddc5aee3c41057ddec1844d2a80c4c.tar.bz2
move vserver related files to a vserver directory.
dont't install puppet on a newly created vserver. fix identation of vserver.pp
Diffstat (limited to 'files/vserver/destroy_openvpn_interface')
-rwxr-xr-xfiles/vserver/destroy_openvpn_interface9
1 files changed, 9 insertions, 0 deletions
diff --git a/files/vserver/destroy_openvpn_interface b/files/vserver/destroy_openvpn_interface
new file mode 100755
index 0000000..aa89ed4
--- /dev/null
+++ b/files/vserver/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"
+