fix check for sync delay parameter

This commit is contained in:
John Bowdre 2022-08-06 21:36:31 -05:00
parent 76d44d9316
commit 68c5515294

View file

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