From 0f0be7c8ca282f5a41dd3e3febdf1c973960d971 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Mon, 27 Jan 2025 19:33:47 +0100 Subject: [PATCH] Use whois timeout in omr-tracker post-tracking status script --- omr-tracker/files/usr/share/omr/post-tracking.d/020-status | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/omr-tracker/files/usr/share/omr/post-tracking.d/020-status b/omr-tracker/files/usr/share/omr/post-tracking.d/020-status index a70ac623d..f0e0af08f 100755 --- a/omr-tracker/files/usr/share/omr/post-tracking.d/020-status +++ b/omr-tracker/files/usr/share/omr/post-tracking.d/020-status @@ -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)" ] && {