Fix broken conditional check that identifies whether content is cached in order to clean it.
This commit is contained in:
parent
26eaf5114b
commit
3d2cf298bf
@ -65,8 +65,7 @@ function cleanup()
|
|||||||
-mindepth 1 -type d -empty -delete
|
-mindepth 1 -type d -empty -delete
|
||||||
|
|
||||||
# remove files older than ${retention_days} days from the cache
|
# remove files older than ${retention_days} days from the cache
|
||||||
if [ -e "${data_path}"/cache/?/ ]
|
if [ ! -z "$(ls -A $data_path/cache)" ]; then
|
||||||
then
|
|
||||||
find "${data_path}"/cache/?/ -type f -mtime +${retention_days} -delete
|
find "${data_path}"/cache/?/ -type f -mtime +${retention_days} -delete
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user