Optimize OS/release/version detection for faster execution #70

Merged
benpro merged 86 commits from fast-debian-check into master 2019-04-05 11:01:57 +02:00
Showing only changes of commit 2ad82591f3 - Show all commits

View file

@ -721,8 +721,8 @@ if is_debian; then
for file in /home/backup/*; do
limit=$(date +"%s" -d "now - 2 day")
updated_at=$(stat -c "%Y" $file)
if [ $limit -gt $updated_at ]; then
failed "IS_BACKUPUPTODATE"
if [ -f "$file" ] && [ $limit -gt $updated_at ]; then
failed "IS_BACKUPUPTODATE" "$file has not been backed up"
break;
fi
done