utils/watchcat: restart failure time after network restart

Without this change these settings:
Mode: Restart Interface
Period: 30s
Check Interval: 5s
will do ping every 30s, if all pings are fail then
it try to take action every 5 second.

After apply this patch watchcat will try to send
ping every 5 second in next 30 sec before take action if
all pings are fail.

This is important for wireless uplinks like 3G/4G that
need some time to establish connection.

Signed-off-by: Rozhuk Ivan <rozhuk.im@gmail.com>
This commit is contained in:
Rozhuk Ivan 2022-02-20 08:22:05 +03:00 committed by Rosen Penev
parent a9170cf860
commit 0238bcef19
2 changed files with 3 additions and 1 deletions

View File

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=watchcat
PKG_VERSION:=1
PKG_RELEASE:=13
PKG_RELEASE:=14
PKG_MAINTAINER:=Roger D <rogerdammit@gmail.com>
PKG_LICENSE:=GPL-2.0

View File

@ -140,6 +140,8 @@ watchcat_monitor_network() {
watchcat_restart_all_network
fi
/etc/init.d/watchcat start
# Restart timer cycle.
time_lastcheck_withinternet="$time_now"
}
done