forked from evolix/evocheck
Fix #1959. IS_BACKUPUPTODATE now fails if files are older than 2 day
This commit is contained in:
parent
3a5fe95bed
commit
acca5f226e
|
@ -428,7 +428,7 @@ if [ -e /etc/debian_version ]; then
|
||||||
# Check if files in /home/backup/ are up-to-date
|
# Check if files in /home/backup/ are up-to-date
|
||||||
if [ "$IS_BACKUPUPTODATE" = 1 ]; then
|
if [ "$IS_BACKUPUPTODATE" = 1 ]; then
|
||||||
[ -d /home/backup/ ] && for file in /home/backup/*; do
|
[ -d /home/backup/ ] && for file in /home/backup/*; do
|
||||||
if [ -f $file ] && [ $(stat -c "%Y" $file) -lt $(date +"%s" -d "now - 1 day") ]; then
|
if [ -f $file ] && [ $(stat -c "%Y" $file) -lt $(date +"%s" -d "now - 2 day") ]; then
|
||||||
echo 'IS_BACKUPUPTODATE FAILED!'
|
echo 'IS_BACKUPUPTODATE FAILED!'
|
||||||
break;
|
break;
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue