fix cleanup-directory function

This commit is contained in:
thek4n 2025-11-13 13:10:30 +03:00
parent ee2ad8f08b
commit b50a1bcae2
2 changed files with 2 additions and 2 deletions

View File

@ -11,7 +11,7 @@ if [ ! -d "${directory}" ]; then
return 1 return 1
fi fi
if [ -n "${DRYRUN}" ]; then if [ -n "${DRYRUN:-}" ]; then
echo "Deleting files not accessed for a ${age} days:" echo "Deleting files not accessed for a ${age} days:"
find "${directory}" -mindepth 1 -atime "${age}" -not -type d -not -name cleanup.log find "${directory}" -mindepth 1 -atime "${age}" -not -type d -not -name cleanup.log

View File

@ -12,7 +12,7 @@ fi
readonly log_file="${directory}/cleanup.log" readonly log_file="${directory}/cleanup.log"
if [ -n "${DRYRUN}" ]; then if [ -n "${DRYRUN:-}" ]; then
log_file="/dev/null" log_file="/dev/null"
fi fi