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 <redacted>
PKG_NAME:=watchcat
PKG_VERSION:=1
-PKG_RELEASE:=23
+PKG_RELEASE:=24
PKG_MAINTAINER:=Roger D <rogerdammit@gmail.com>
PKG_LICENSE:=GPL-2.0
done
[ "$((time_now - time_lastcheck_withinternet))" -ge "$failure_period" ] && {
+ recovery_started="$time_now"
+
if [ "$script" != "" ]; then
watchcat_run_script "$script" "$iface"
else
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