summaryrefslogtreecommitdiff
path: root/scripts/vti-up-down.sh
blob: efa4118bb39e3b4e0336da82861c295c8421bb6e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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