#!/bin/sh

[ "$ACTION" = ifup ] || exit 0

/etc/init.d/fbwifi enabled || exit 0

ip route get fibmatch 1.1.1.1 | grep -q "$DEVICE" || exit 0

logger -t fbwifi "Reloading fbwifi due to $ACTION of $INTERFACE ($DEVICE)"
/etc/init.d/fbwifi restart
