aboutsummaryrefslogtreecommitdiffstats
path: root/config/suricata
diff options
context:
space:
mode:
authorbmeeks8 <bmeeks8@bellsouth.net>2014-09-24 13:45:52 -0400
committerbmeeks8 <bmeeks8@bellsouth.net>2014-12-15 12:04:37 -0500
commit3335f3bfa5a75e11bb89d1482da1addc7ed6ecff (patch)
treed28801d78ab236666bcbe1fefe63636d61238bd7 /config/suricata
parent16e975b4421e04052b7f87d6d65690ca4c57119f (diff)
downloadpfsense-packages-3335f3bfa5a75e11bb89d1482da1addc7ed6ecff.tar.gz
pfsense-packages-3335f3bfa5a75e11bb89d1482da1addc7ed6ecff.tar.bz2
pfsense-packages-3335f3bfa5a75e11bb89d1482da1addc7ed6ecff.zip
When LOG DIR SIZE LIMIT is exceeded, cleanup rotated log files, too.
Diffstat (limited to 'config/suricata')
-rw-r--r--config/suricata/suricata_check_cron_misc.inc4
1 files changed, 4 insertions, 0 deletions
diff --git a/config/suricata/suricata_check_cron_misc.inc b/config/suricata/suricata_check_cron_misc.inc
index 901ee88b..d275c5a7 100644
--- a/config/suricata/suricata_check_cron_misc.inc
+++ b/config/suricata/suricata_check_cron_misc.inc
@@ -93,6 +93,10 @@ function suricata_check_dir_size_limit($suricataloglimitsize) {
}
}
+ // Cleanup any rotated logs
+ log_error(gettext("[Suricata] Deleting any rotated log files for {$value['descr']} ({$if_real})..."));
+ unlink_if_exists("{$suricata_log_dir}/*.log.*");
+
// Check for any captured stored files and clean them up
unlink_if_exists("{$suricata_log_dir}/files/*");