summaryrefslogtreecommitdiff
path: root/scripts/vti-up-down
diff options
context:
space:
mode:
authorAlex Harpin <development@landsofshadow.co.uk>2014-10-05 14:55:37 +0100
committerAlex Harpin <development@landsofshadow.co.uk>2014-10-05 14:55:37 +0100
commita45c529838e42e5584b9cb991c893d1675054b35 (patch)
tree335ddf7a4cfb112c1ff520efd72608cc14174526 /scripts/vti-up-down
parentc53fca329e2ff49625321c516917896d566add6e (diff)
downloadvyatta-cfg-vpn-a45c529838e42e5584b9cb991c893d1675054b35.tar.gz
vyatta-cfg-vpn-a45c529838e42e5584b9cb991c893d1675054b35.zip
vyatta-cfg-vpn: rename vti-up-down.sh to vti-up-down
Rename vti-up-down.sh to vti-up-down to be consistent with others.
Diffstat (limited to 'scripts/vti-up-down')
-rwxr-xr-xscripts/vti-up-down17
1 files changed, 17 insertions, 0 deletions
diff --git a/scripts/vti-up-down b/scripts/vti-up-down
new file mode 100755
index 0000000..60fc191
--- /dev/null
+++ b/scripts/vti-up-down
@@ -0,0 +1,17 @@
+#!/bin/sh
+## Script called up strongswan to bring the vti interface up/down based on the state of the IPSec tunnel.
+## Called as vti_up_down vti_intf_name
+
+source /etc/default/vyatta
+source /etc/default/locale
+case "$PLUTO_VERB" in
+route-client)
+/opt/vyatta/sbin/vyatta-vti-config.pl --updown --intf=$1 --action=up
+ ;;
+down-client)
+/opt/vyatta/sbin/vyatta-vti-config.pl --updown --intf=$1 --action=down
+ ;;
+*)
+ ;;
+esac
+exit 0