1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-03-09 15:40:03 +00:00
This commit is contained in:
suyuan 2024-01-18 01:53:34 +08:00 committed by GitHub
commit d360810a13
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 61 additions and 3 deletions

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"