mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Use whois timeout in omr-tracker post-tracking status script
This commit is contained in:
parent
ab3cbb9a48
commit
0f0be7c8ca
1 changed files with 3 additions and 1 deletions
|
@ -50,7 +50,9 @@ if [ -n "$OMR_TRACKER_INTERFACE" ] && { [ "$(uci -q get openmptcprouter.$OMR_TRA
|
|||
if [ "$(uci -q get openmptcprouter.settings.external_check)" != "0" ]; then
|
||||
#asn="$(wget -4 -qO- -T 4 http://api.iptoasn.com/v1/as/ip/$ipaddr | jsonfilter -q -e '@.as_description')"
|
||||
#[ -z "$asn" ] && {
|
||||
asn="$(timeout 2 whois $ipaddr 2>/dev/null | grep -m 1 -i 'netname' | awk '{print $2}')"
|
||||
whoistimeout=$(uci -q get openmptcprouter.settings.status_whois_timeout)
|
||||
[ -z "$whoistimeout" ] && whoistimeout=2
|
||||
asn="$(timeout $whoistimeout whois $ipaddr 2>/dev/null | grep -m 1 -i 'netname' | awk '{print $2}')"
|
||||
#}
|
||||
fi
|
||||
[ -z "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE)" ] && {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue