From ed80e931de5efeca64280278d8219b421838e3b6 Mon Sep 17 00:00:00 2001 From: Ruledo Date: Wed, 12 Feb 2025 11:38:41 -0800 Subject: [PATCH 1/2] Watchclock Dog checks if meshtasticd is running While loop checks if meshtasticd is running and if not nopes out until next loop. --- .../usr/local/bin/femto-watchclock-dog.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/femto-watchclock-dog.sh b/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/femto-watchclock-dog.sh index 6cefdfa..8ee51f3 100755 --- a/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/femto-watchclock-dog.sh +++ b/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/femto-watchclock-dog.sh @@ -23,6 +23,12 @@ if [ ! -w "$LAST_TIME_FILE" ]; then fi while true; do + # Check if meshtasticd service is running + if ! systemctl is-active --quiet meshtasticd; then + #echo "meshtasticd service is not running. Skipping..." | tee -a "$LOGFILE" + sleep 5 + continue + fi NEW_TIME=$(date +%s) # Ensure last_time file is readable before using it From 4f7c392ae6315bb67093fd7165b268c4c4300551 Mon Sep 17 00:00:00 2001 From: noon92 <40807970+noon92@users.noreply.github.com> Date: Thu, 13 Feb 2025 23:30:19 +0200 Subject: [PATCH 2/2] Change sleep time to 30 --- .../usr/local/bin/femto-watchclock-dog.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/femto-watchclock-dog.sh b/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/femto-watchclock-dog.sh index 8ee51f3..d6c56bc 100755 --- a/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/femto-watchclock-dog.sh +++ b/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/femto-watchclock-dog.sh @@ -26,7 +26,7 @@ while true; do # Check if meshtasticd service is running if ! systemctl is-active --quiet meshtasticd; then #echo "meshtasticd service is not running. Skipping..." | tee -a "$LOGFILE" - sleep 5 + sleep 30 continue fi NEW_TIME=$(date +%s) @@ -53,6 +53,6 @@ while true; do exit 1 fi - sleep 5 + sleep 30 done