summaryrefslogtreecommitdiff
path: root/scripts/vti-up-down
blob: 4672076c811af4a5a77566feeece5100de35ecd7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/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
up-client | up-host)
/bin/ip route delete default table 220
/opt/vyatta/sbin/vyatta-vti-config.pl --updown --intf=$1 --conn=$PLUTO_CONNECTION --action=up > /dev/null 2>&1 &
    ;;
down-client | down-host)
/opt/vyatta/sbin/vyatta-vti-config.pl --updown --intf=$1 --conn=$PLUTO_CONNECTION --action=down > /dev/null 2>&1 &
    ;;
*)
    ;;
esac
exit 0