Merge pull request #522 from lnxg33k/master

Add a logrotate config for Suricata
This commit is contained in:
Chris Long
2020-09-21 23:06:52 -07:00
committed by GitHub

View File

@@ -468,6 +468,22 @@ install_suricata() {
echo "Suricata attempted to start but is not running. Exiting"
exit 1
fi
cat >/etc/logrotate.d/suricata <<EOF
/var/log/suricata/*.log /var/log/suricata/*.json
{
hourly
rotate 0
missingok
nocompress
size=500M
sharedscripts
postrotate
/bin/kill -HUP \`cat /var/run/suricata.pid 2>/dev/null\` 2>/dev/null || true
endscript
}
EOF
}
test_suricata_prerequisites() {