diff options
author | Amish | 2018-04-11 17:23:09 +0530 |
---|---|---|
committer | Amish | 2018-04-11 17:23:09 +0530 |
commit | 094878c754bd942a15cb15ffcfdbe4baf88f545c (patch) | |
tree | 87447bc5e4ae41ee0fe7310efa7367d6bcf8782e /snort.logrotate | |
parent | ad764d168b6202a8b40412f93603ce6a85dcaac7 (diff) | |
download | aur-094878c754bd942a15cb15ffcfdbe4baf88f545c.tar.gz |
Simplify package building and try to do some cool stuff!
Diffstat (limited to 'snort.logrotate')
-rw-r--r-- | snort.logrotate | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/snort.logrotate b/snort.logrotate new file mode 100644 index 000000000000..ad6fbd2fcae0 --- /dev/null +++ b/snort.logrotate @@ -0,0 +1,19 @@ +/var/log/snort/*.log { + sharedscripts + missingok + notifempty +} + +/var/log/snort/alert /var/log/snort/snort.log* /var/log/snort/snort_unified.log* { + nocompress + nocreate + olddir /var/log/snort/old + sharedscripts + missingok + postrotate + /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 'snort.log*' -type f -mtime +60 -exec /usr/bin/rm '{}' ';' > /dev/null 2>&1 || true + /usr/bin/find /var/log/snort/old -maxdepth 1 -name 'snort_unified.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 +} |