1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-02-15 03:51:51 +00:00
openmptcprouter-feeds/omr-tracker/files/etc/hotplug.d/iface/40-omr-tracker

14 lines
566 B
Text
Raw Normal View History

#!/bin/sh
[ "$ACTION" = ifup -o "$ACTION" = ifupdate -o "$ACTION" = ifdown -o "$ACTION" = iflink ] || exit 0
/etc/init.d/omr-tracker enabled || exit 0
if [ "$ACTION" = ifup -o "$ACTION" = ifupdate -o "$ACTION" = iflink ]; then
#if [ "$(uci -q get network.${INTERFACE}.multipath)" = "on" ] || [ "$(uci -q get network.${INTERFACE}.multipath)" = "master" ]; then
if [ "$INTERFACE" = "omrvpn" ]; then
logger -t "OMR-Tracker" "Reloading OMR-Tracker due to $ACTION of $INTERFACE ($DEVICE)"
/etc/init.d/omr-tracker restart "$INTERFACE" >/dev/null || exit 0
fi
fi