mirror of https://github.com/aredn/aredn.git
22 lines
706 B
Plaintext
22 lines
706 B
Plaintext
|
#!/bin/sh
|
||
|
|
||
|
# Handles setting up rules for tunnel interfaces
|
||
|
#echo "Interface is $INTERFACE $ACTION" >> /tmp/vtundscript.log
|
||
|
ISVPN=false
|
||
|
case "$INTERFACE" in
|
||
|
vpn*)
|
||
|
ISVPN=true;
|
||
|
;;
|
||
|
esac
|
||
|
|
||
|
if [ "$ISVPN" = true ]; then
|
||
|
INTF=tun${INTERFACE:3}
|
||
|
if [ $ACTION = "ifup" ] ; then
|
||
|
/usr/local/bin/vtun_up $INTF up
|
||
|
# echo "$INTF up" >> /tmp/vtundscript.log
|
||
|
elif [ $ACTION = "ifdown" ] ; then
|
||
|
/usr/local/bin/vtun_up $INTF down
|
||
|
# echo "$INTF down" >> /tmp/vtundscript.log
|
||
|
fi
|
||
|
fi
|