diff options
Diffstat (limited to 'snort.logrotate')
-rw-r--r-- | snort.logrotate | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/snort.logrotate b/snort.logrotate index b0c1adf81e43..258cc51c40f2 100644 --- a/snort.logrotate +++ b/snort.logrotate @@ -2,16 +2,20 @@ sharedscripts missingok notifempty + postrotate + /usr/bin/systemctl try-restart snort.service > /dev/null 2>&1 || true + endscript } -/var/log/snort/alert_fast.txt /var/log/snort/*.log.* { +/var/log/snort/alert_*.txt /var/log/snort/*.log.* { nocompress nocreate olddir /var/log/snort/old sharedscripts missingok + notifempty postrotate - /usr/bin/find /var/log/snort/old -maxdepth 1 -name 'alert_fast.*' -type f -mtime +60 -exec /usr/bin/rm '{}' ';' > /dev/null 2>&1 || true + /usr/bin/find /var/log/snort/old -maxdepth 1 -name 'alert_*' -type f -mtime +60 -exec /usr/bin/rm '{}' ';' > /dev/null 2>&1 || true /usr/bin/find /var/log/snort/old -maxdepth 1 -name '*.log*' -type f -mtime +60 -exec /usr/bin/rm '{}' ';' > /dev/null 2>&1 || true /usr/bin/systemctl try-restart snort.service > /dev/null 2>&1 || true endscript |