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!"