From 68c5515294dfc5ff611f295cc865925fa8bde4ba Mon Sep 17 00:00:00 2001 From: John Bowdre Date: Sat, 6 Aug 2022 21:36:31 -0500 Subject: [PATCH] fix check for sync delay parameter --- client/build/sync.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/build/sync.sh b/client/build/sync.sh index 485a632..c59603f 100644 --- a/client/build/sync.sh +++ b/client/build/sync.sh @@ -2,8 +2,8 @@ set -e -# initial sync is immediate, cron syncs have a random delay unless $CRON_DELAY==false -if [ $1 == "delay" ]; then +# insert optional random delay +if [ x$1 == x"delay" ]; then echo -e "\n[$(date +"%Y/%m/%d-%H:%M:%S")] Waiting for random delay..." sleep $(( RANDOM % SYNC_DELAY_MAX_SECONDS + 1 )) echo -e "[$(date +"%Y/%m/%d-%H:%M:%S")] Sync starts NOW!"