Fix empty directory removal for log expiration
* modules/openstack_project/files/log_archive_maintenance.sh: The refactoring in I5ff6defb4d403f3017ab098c2ac1df3777662933 orphaned a stray -not in the directory removal expression, inverting the meaning of -empty as a result. Luckily non-empty directories can't be removed without additional effort, so no data was lost (just some very large cronspam sent instead). This removes the remaining cruft. Change-Id: Ie6ce39ed46eedfaaf0771ab1a91f5f50c90c1b62
This commit is contained in:
parent
17ded93e6f
commit
714fa40191
@ -7,7 +7,7 @@ find -O3 /srv/static/logs/ -depth -not -name robots.txt -not -name lost+found \
|
|||||||
\( -name \*.txt -or -name \*.html -or -name tmp\* \) \
|
\( -name \*.txt -or -name \*.html -or -name tmp\* \) \
|
||||||
-exec gzip \{\} \; \) \
|
-exec gzip \{\} \; \) \
|
||||||
-o \( -type f -mtime +120 -execdir rm \{\} \; \) \
|
-o \( -type f -mtime +120 -execdir rm \{\} \; \) \
|
||||||
-o \( -type d -not -empty -mtime +1 -execdir rmdir {} \; \) \)
|
-o \( -type d -empty -mtime +1 -execdir rmdir {} \; \) \)
|
||||||
find -O3 /srv/static/docs-draft/ -depth -not -name lost+found \( \
|
find -O3 /srv/static/docs-draft/ -depth -not -name lost+found \( \
|
||||||
\( -type f -mtime +21 -name \*.gz -execdir rm \{\} \; \) \
|
\( -type f -mtime +21 -name \*.gz -execdir rm \{\} \; \) \
|
||||||
-o \( -type d -empty -mtime +1 -execdir rmdir {} \; \) \)
|
-o \( -type d -empty -mtime +1 -execdir rmdir {} \; \) \)
|
||||||
|
Loading…
Reference in New Issue
Block a user