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

Merge branch 'test' into develop

This commit is contained in:
suyuan 2021-02-17 23:10:51 +08:00
commit cf19516cb4
7 changed files with 74 additions and 64 deletions

View file

@ -970,9 +970,11 @@ fi
# Save wan settings for status page
if [ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.lc)" = "" ] || [ $(($(date +"%s") + $((30 + RANDOM % 31)) - $(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.lc))) -gt 3600 ] || [ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.state)" = "down" ]; then
[ "$(uci -q get openmptcprouter.settings.debug)" = "true" ] && _log "Get status and settings for $OMR_TRACKER_INTERFACE..."
local ipaddr=""
local ip6addr=""
if [ "$(uci -q get openmptcprouter.settings.external_check)" != "0" ] && [ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.vpn)" != "1" ]; then
local ipaddr="$(omr-ip-intf $OMR_TRACKER_DEVICE)"
local ip6addr="$(omr-ip6-intf $OMR_TRACKER_DEVICE)"
[ -n "$OMR_TRACKER_DEVICE_IP" ] && ipaddr="$(omr-ip-intf $OMR_TRACKER_DEVICE)"
[ -n "$OMR_TRACKER_DEVICE_IP6" ] && ip6addr="$(omr-ip6-intf $OMR_TRACKER_DEVICE)"
else
uci -q set openmptcprouter.$OMR_TRACKER_INTERFACE.lc=$(date +"%s")
uci -q set openmptcprouter.$OMR_TRACKER_INTERFACE.state="up"