From: Dharmik Parmar Date: Wed, 24 Jun 2026 17:07:18 +0000 (+0530) Subject: watchcat: clarify recovery timer baseline X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=785f816efcc68abd00f63a064227d76e21b6693c;p=openwrt-packages.git watchcat: clarify recovery timer baseline Keep the default restart timing based on the moment the recovery action is triggered. The optional reset_failure_timer path still starts a fresh failure window after the recovery action finishes. This makes the two timing modes explicit. Signed-off-by: Dharmik Parmar --- diff --git a/utils/watchcat/Makefile b/utils/watchcat/Makefile index 88fb0bfc7..d43f1d21e 100644 --- a/utils/watchcat/Makefile +++ b/utils/watchcat/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=watchcat PKG_VERSION:=1 -PKG_RELEASE:=23 +PKG_RELEASE:=24 PKG_MAINTAINER:=Roger D PKG_LICENSE:=GPL-2.0 diff --git a/utils/watchcat/files/watchcat.sh b/utils/watchcat/files/watchcat.sh index a5f406283..e0ecb5cf8 100644 --- a/utils/watchcat/files/watchcat.sh +++ b/utils/watchcat/files/watchcat.sh @@ -169,6 +169,8 @@ watchcat_monitor_network() { done [ "$((time_now - time_lastcheck_withinternet))" -ge "$failure_period" ] && { + recovery_started="$time_now" + if [ "$script" != "" ]; then watchcat_run_script "$script" "$iface" else @@ -188,8 +190,10 @@ watchcat_monitor_network() { time_now="$(cat /proc/uptime)" time_now="${time_now%%.*}" time_lastcheck="$time_now" + time_lastcheck_withinternet="$time_now" + else + time_lastcheck_withinternet="$recovery_started" fi - time_lastcheck_withinternet="$time_now" } done