mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Site used to detect public IPv4 or IPv6 can be changed by settings
This commit is contained in:
parent
6e3e48a693
commit
9edcbba492
5 changed files with 33 additions and 11 deletions
|
@ -414,7 +414,9 @@ if [ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.lc)" = "" ] || [ $(($(
|
|||
fi
|
||||
[ -n "$ipaddr" ] && {
|
||||
# Check if we can get a IPv6 address, if yes enable RA else disable
|
||||
local ip6addr="$(curl -s -6 -m 3 http://ipv6.openmptcprouter.com/)"
|
||||
local check_ipv6_website="$(uci -q get openmptcprouter.settings.check_ipv6_website)"
|
||||
[ -z "$check_ipv6_website" ] && check_ipv6_website="http://ipv6.openmptcprouter.com/"
|
||||
local ip6addr="$(curl -s -6 -m 3 $check_ipv6_website)"
|
||||
[ -z "$ip6addr" ] && {
|
||||
local ip6addr="$(curl -s -6 -m 3 http://ifconfig.co/)"
|
||||
}
|
||||
|
@ -501,8 +503,8 @@ fi
|
|||
[ -n "$OMR_TRACKER_LATENCY" ] && {
|
||||
[ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.latency)" != "" ] && uci -q set openmptcprouter.$OMR_TRACKER_INTERFACE.latency_previous="$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.latency)"
|
||||
uci -q set openmptcprouter.$OMR_TRACKER_INTERFACE.latency="$OMR_TRACKER_LATENCY"
|
||||
[ -z "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.latency_max)" ] && uci -q set openmptcprouter.$OMR_TRACKER_INTERFACE.latency_max="$OMR_TRACKER_LATENCY"
|
||||
[ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.latency_max)" -lt "$OMR_TRACKER_LATENCY" ] && uci -q set openmptcprouter.$OMR_TRACKER_INTERFACE.latency_max="$OMR_TRACKER_LATENCY"
|
||||
#[ -z "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.latency_max)" ] && uci -q set openmptcprouter.$OMR_TRACKER_INTERFACE.latency_max="$OMR_TRACKER_LATENCY"
|
||||
#[ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.latency_max)" -lt "$OMR_TRACKER_LATENCY" ] && uci -q set openmptcprouter.$OMR_TRACKER_INTERFACE.latency_max="$OMR_TRACKER_LATENCY"
|
||||
if [ "$multipath_config" = "on" ] && [ "$(uci -q get network.$OMR_TRACKER_INTERFACE.multipath)" != "master" ] && ([ "$(uci -q get openmptcprouter.settings.master)" = "dynamic" ] || (([ "$(uci -q get openmptcprouter.settings.master)" = "change" ] || [ "$(uci -q get openmptcprouter.settings.master)" = "" ]) && [ "$(uci -q get openmptcprouter.settings.master_lcintf | grep $OMR_TRACKER_INTERFACE)" = "" ])); then
|
||||
masterintf="$(uci -q show network | grep multipath=\'master\' | cut -d'.' -f2)"
|
||||
masterlatency="$(uci -q get openmptcprouter.$masterintf.latency | tr -d '\n')"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue