From e2ec550fab164629076e38ccbdc42d3a7e81c40f Mon Sep 17 00:00:00 2001 From: Hyperling Date: Tue, 14 Apr 2026 08:39:20 -0700 Subject: [PATCH] Increase sleep timer for sync-all-loop and allow a custom time to be passed. --- rc_shared.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/rc_shared.sh b/rc_shared.sh index 6cce55f..48dc427 100644 --- a/rc_shared.sh +++ b/rc_shared.sh @@ -178,10 +178,18 @@ function sync-all { echo -e "`date` - Done.\n" } function sync-all-loop { + typeset -i sleep_time + if [[ "$1" ]]; then + sleep_time="$1" + fi + if [[ -z "$sleep_time" || "$sleep_time" == 0 ]]; then + sleep_time="300" + fi + log "`date` - Sleep timeer set for '$sleep_time' seconds." while true; do sync-all echo -e "\n\n*** Sleeping... ***\n\n" - sleep 30 + sleep 300 done }