From 286ad9ff66994b74c40ab28ed49c3e80282f1f30 Mon Sep 17 00:00:00 2001 From: Masaya Tojo Date: Tue, 14 Sep 2021 11:19:42 +0900 Subject: check-backup-of-nextcloud: Fix. --- jobs/check-backup-of-nextcloud.run | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jobs/check-backup-of-nextcloud.run b/jobs/check-backup-of-nextcloud.run index 0452dbf..e447bcb 100755 --- a/jobs/check-backup-of-nextcloud.run +++ b/jobs/check-backup-of-nextcloud.run @@ -5,7 +5,7 @@ todays_backup="s3://qkbackup/nextcloud/$(date "+%w")/" echo "Check $todays_backup." output="$(guix environment --ad-hoc python2-s3cmd -- s3cmd ls "$todays_backup")" -# UTC の時刻で日付が同日の場合はバックアップに成功していると見做す +# UTC の時刻で日付が前日の場合はバックアップに成功していると見做す echo "$output" |\ - awk -v utc_today="$(TZ=UTC date "+%F")" \ + awk -v utc_today="$(TZ=UTC date "+%F" -d '1 day ago')" \ '$1 != utc_today { print "Failed!"; exit 1 } ; { print }' -- cgit v1.2.3