summaryrefslogtreecommitdiffstats
path: root/templates/logrotate/containers_logrotate.conf.erb
blob: cbf17b4293d40eac22b0d3f5011ab7b2a82c8b74 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/var/log/containers/*/*.log {
  rotate <%= @rotate %>
  size <%= @size %>
  missingok
  notifempty
<%- if @delaycompress %>
  delaycompress
<%- end %>
  postrotate
    /sbin/lsof -nPs +L1 +D /var/log 2>&1|\
    /bin/perl -ne '/\S+\s+(\d+).*\/var\/log\/.*\(deleted\)/ && print "$1\n"' |\
    /bin/xargs -n1 -r -t kill -HUP
  endscript
}