aredn/files/etc/hotplug.d/iface/13-vtun

23 lines
709 B
Plaintext
Raw Normal View History

2015-04-01 09:42:53 -06:00
#!/bin/sh
# Handles setting up rules for tunnel interfaces
if [ -x "/usr/sbin/vtund" ]
then
ISVPN=false
case "$INTERFACE" in
tun*)
ISVPN=true;
;;
esac
2015-04-01 09:42:53 -06:00
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
fi