summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRozhuk Ivan2022-02-20 05:22:05 +0000
committerRosen Penev2022-02-24 01:28:43 +0000
commit0238bcef19e5cde07e5dbf55a77a3e85bf0446c3 (patch)
tree1ac0ae88a1fbfdc50ee6231a97ca3f342746e0de
parenta9170cf860b262854d46f040152e892c7e9e36b2 (diff)
downloadpackages-0238bcef19e5cde07e5dbf55a77a3e85bf0446c3.tar.gz
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>
-rw-r--r--utils/watchcat/Makefile2
-rw-r--r--utils/watchcat/files/watchcat.sh2
2 files changed, 3 insertions, 1 deletions
diff --git a/utils/watchcat/Makefile b/utils/watchcat/Makefile
index bd0beafff1..6f2e4cade1 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:=13
+PKG_RELEASE:=14
PKG_MAINTAINER:=Roger D <rogerdammit@gmail.com>
PKG_LICENSE:=GPL-2.0
diff --git a/utils/watchcat/files/watchcat.sh b/utils/watchcat/files/watchcat.sh
index 49911848ef..9ee0f6d568 100644
--- a/utils/watchcat/files/watchcat.sh
+++ b/utils/watchcat/files/watchcat.sh
@@ -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