mirror of
https://github.com/jbowdre/library-syncer.git
synced 2024-11-23 10:12:18 +00:00
fix check for sync delay parameter
This commit is contained in:
parent
76d44d9316
commit
68c5515294
1 changed files with 2 additions and 2 deletions
|
@ -2,8 +2,8 @@
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# initial sync is immediate, cron syncs have a random delay unless $CRON_DELAY==false
|
# insert optional random delay
|
||||||
if [ $1 == "delay" ]; then
|
if [ x$1 == x"delay" ]; then
|
||||||
echo -e "\n[$(date +"%Y/%m/%d-%H:%M:%S")] Waiting for random delay..."
|
echo -e "\n[$(date +"%Y/%m/%d-%H:%M:%S")] Waiting for random delay..."
|
||||||
sleep $(( RANDOM % SYNC_DELAY_MAX_SECONDS + 1 ))
|
sleep $(( RANDOM % SYNC_DELAY_MAX_SECONDS + 1 ))
|
||||||
echo -e "[$(date +"%Y/%m/%d-%H:%M:%S")] Sync starts NOW!"
|
echo -e "[$(date +"%Y/%m/%d-%H:%M:%S")] Sync starts NOW!"
|
||||||
|
|
Loading…
Reference in a new issue