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:
parent
a605265756
commit
4bdbd1a4c8
1 changed files with 6 additions and 1 deletions
|
@ -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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue