forked from evolix/evocheck
Add comment to explain why looking for all files
This commit is contained in:
parent
43d09c3ba1
commit
5adfdcc614
|
@ -716,6 +716,8 @@ check_backupuptodate() {
|
||||||
backup_dir="/home/backup"
|
backup_dir="/home/backup"
|
||||||
if [ -d "${backup_dir}" ]; then
|
if [ -d "${backup_dir}" ]; then
|
||||||
if [ -n "$(ls -A ${backup_dir})" ]; then
|
if [ -n "$(ls -A ${backup_dir})" ]; then
|
||||||
|
# Look for all files, including subdirectories.
|
||||||
|
# If this turns out to be problematic, we can go back to first level only, with --max-depth=1
|
||||||
find "${backup_dir}" -type f | while read -r file; do
|
find "${backup_dir}" -type f | while read -r file; do
|
||||||
limit=$(date +"%s" -d "now - 2 day")
|
limit=$(date +"%s" -d "now - 2 day")
|
||||||
updated_at=$(stat -c "%Y" "$file")
|
updated_at=$(stat -c "%Y" "$file")
|
||||||
|
|
Loading…
Reference in a new issue