1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-03-09 15:40:03 +00:00

Better log when new public ip detected

This commit is contained in:
Ycarus (Yannick Chabanois) 2024-01-17 18:26:00 +01:00
parent a605265756
commit 4bdbd1a4c8

View file

@ -65,7 +65,12 @@ if [ -n "$OMR_TRACKER_INTERFACE" ] && ([ "$(uci -q get openmptcprouter.$OMR_TRAC
}
fi
[ -n "$ipaddr" ] && [ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.publicip)" != "$ipaddr" ] && {
_log "New public ip detected for $OMR_TRACKER_INTERFACE ($OMR_TRACKER_DEVICE): $ipaddr (previous: $(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.publicip))"
previousip="$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.publicip)"
if [ -n "$previousip" ]; then
_log "New public ip detected for $OMR_TRACKER_INTERFACE ($OMR_TRACKER_DEVICE): $ipaddr (previous: $(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.publicip))"
else
_log "New public ip detected for $OMR_TRACKER_INTERFACE ($OMR_TRACKER_DEVICE): $ipaddr (First public IP detected)"
fi
uci -q set openmptcprouter.$OMR_TRACKER_INTERFACE.publicip="$ipaddr"
/etc/init.d/mptcp enabled && {
_log "Reload MPTCP for $OMR_TRACKER_DEVICE"