From 35a64c49a3868c24495947a88004c9c3fce5035a Mon Sep 17 00:00:00 2001 From: Hyperling Date: Thu, 28 May 2026 15:12:23 -0700 Subject: [PATCH] Add a counter to the sync loop, plus actually use the sleep timer variable. --- rc_shared.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/rc_shared.sh b/rc_shared.sh index 31c5e17..78790fb 100644 --- a/rc_shared.sh +++ b/rc_shared.sh @@ -306,7 +306,7 @@ function sync-all { echo -e "`date` - Done.\n" } function sync-all-loop { - typeset -i sleep_time + typeset -i sleep_time count if [[ "$1" ]]; then sleep_time="$1" fi @@ -314,10 +314,12 @@ function sync-all-loop { sleep_time="300" fi log "`date` - Sleep timer set for '$sleep_time' seconds." + count=0 while true; do sync-all - echo -e "\n\n*** Sleeping... ***\n\n" - sleep 300 + count=$(( count + 1 )) + echo -e "\n\n*** Sleeping for '$sleep_time' after run# '$count'! ***\n\n" + sleep $sleep_time done }