Merge "Fix logrotate_crond issues"

This commit is contained in:
Zuul 2018-06-14 17:32:44 +00:00 committed by Gerrit Code Review
commit 220170dfb2
1 changed files with 3 additions and 3 deletions

View File

@ -22,8 +22,8 @@
\( -mtime +<%= @purge_after_days %> -or \
-atime +<%= @purge_after_days %> -or \
-ctime +<%= @purge_after_days %> \) -exec rm -f {} \;;
/sbin/lsof -nPs +L1 +D /var/log 2>&1|\
awk '/\S+\s+[0-9]+\s.*\/var\/log\/.*\(deleted\)/ {print $2}' |\
/bin/xargs -n1 -r -t kill -HUP
/sbin/lsof -nPs +L1 +D /var/log/containers 2>&1|\
awk '/\S+\s+[0-9]+\s.*\/var\/log\/containers\/.*\(deleted\)/ {print $2}' |\
sort -u | /bin/xargs -n1 -r -t kill -HUP
endscript
}