summarylogtreecommitdiffstats
path: root/snort.logrotate
diff options
context:
space:
mode:
authorM0Rf302021-06-06 02:10:50 +0200
committerM0Rf302021-06-06 02:10:50 +0200
commite114d0e3338a86e0e691fa987a081ac317b26d68 (patch)
tree9d3e6ecf4e7eff2a8ef24a9564d878cf19bf4ed9 /snort.logrotate
parent84051937543fac114ccea3cca55081a7798a8898 (diff)
downloadaur-e114d0e3338a86e0e691fa987a081ac317b26d68.tar.gz
snort: 3.1.5.0
Diffstat (limited to 'snort.logrotate')
-rw-r--r--snort.logrotate18
1 files changed, 18 insertions, 0 deletions
diff --git a/snort.logrotate b/snort.logrotate
new file mode 100644
index 000000000000..b0c1adf81e43
--- /dev/null
+++ b/snort.logrotate
@@ -0,0 +1,18 @@
+/var/log/snort/*.log {
+ sharedscripts
+ missingok
+ notifempty
+}
+
+/var/log/snort/alert_fast.txt /var/log/snort/*.log.* {
+ nocompress
+ nocreate
+ olddir /var/log/snort/old
+ sharedscripts
+ missingok
+ 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 '*.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
+}