
Since static.openstack.org is no longer serving a docs-draft.openstack.org vhost, and downstream consumers of this module are unlikely to have been doing so themselves either, stop bothering to attempt to expire content for it. Change-Id: I413ac425d752f4fe839648808c0df8c620bef1a5 Depends-On: Ib44df24100192f7903eb60c6fc93feeea0894b90
11 lines
492 B
Bash
11 lines
492 B
Bash
#!/bin/sh
|
|
sleep $((RANDOM%600)) && \
|
|
flock -n /var/run/gziplogs.lock \
|
|
find -O3 /srv/static/logs/ -depth -not -name robots.txt -not -name lost+found \
|
|
-not -wholename /srv/static/logs/help/\* \( \
|
|
\( -type f -mmin +10 -not -name \*\[.-\]gz -not -name \*\[._-\]\[zZ\] \
|
|
\( -name \*.txt -or -name \*.html -or -name tmp\* \) \
|
|
-exec gzip \{\} \; \) \
|
|
-o \( -type f -mtime +30 -execdir rm \{\} \; \) \
|
|
-o \( -type d -empty -mtime +1 -execdir rmdir {} \; \) \)
|