missingok

/var/log/rsyslog/local/e2guardian/*.log {
  rotate 365
  daily
  compress
  delaycompress
  sharedscripts
  ifempty
  copytruncate
  postrotate
    /usr/lib/rsyslog/rsyslog-rotate > /dev/null
  endscript
}

/var/log/e2guardian/dstats*.log {
  rotate 7
  daily
  compress
  delaycompress
  sharedscripts
  notifempty
  missingok
  copytruncate
  postrotate
    /usr/lib/rsyslog/rsyslog-rotate > /dev/null
  endscript
}

%if %%is_defined('activer_log_distant')
 %if %%activer_log_distant == 'oui' and %%activer_reception_logs == 'oui'
/var/log/rsyslog/remote/e2guardian/*.log {
  rotate 365
  daily
  compress
  delaycompress
  sharedscripts
  ifempty
  copytruncate
  postrotate
    /usr/lib/rsyslog/rsyslog-rotate > /dev/null
  endscript
}
 %end if
%end if
