]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
logrotate: Rotate suricata logs instead of snort ones
authorStefan Schantl <stefan.schantl@ipfire.org>
Fri, 15 Feb 2019 10:22:14 +0000 (11:22 +0100)
committerStefan Schantl <stefan.schantl@ipfire.org>
Fri, 15 Feb 2019 10:22:14 +0000 (11:22 +0100)
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
config/etc/logrotate.conf

index d38570de5526d5113ff691c1b372696379168e62..f15ee92c378da1509c4deb56a4040038257cb969 100644 (file)
@@ -28,16 +28,16 @@ include /etc/logrotate.d
     endscript
 }
 
-/var/log/snort/alert  {
+/var/log/suricata/*.log {
     weekly
     copytruncate
     compress
     ifempty
     missingok
     postrotate
-       /bin/find /var/log/snort -path '/var/log/snort/[0-9]*' -prune -exec /bin/rm -rf {} \;
-       /bin/find /var/log/snort -name 'snort.log.*' -mtime +28 -exec /bin/rm -rf {} \;
-       /etc/init.d/snort restart
+       /bin/find /var/log/suricata -path '/var/log/suricata/[0-9]*' -prune -exec /bin/rm -rf {} \;
+       /bin/find /var/log/suricata -name 'fast.log.*' -mtime +28 -exec /bin/rm -rf {} \;
+       /bin/kill -HUP `cat /var/run/suricata.pid 2> /dev/null` 2> /dev/null || true
     endscript
 }