From e65dc63a88e4bd40c21d99c7abe6f8c7c7a9d51b Mon Sep 17 00:00:00 2001 From: bmeeks8 Date: Thu, 9 Oct 2014 11:10:31 -0400 Subject: Oops, log mgmt settings are global, so fix array reference. --- config/snort/snort_check_cron_misc.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'config') diff --git a/config/snort/snort_check_cron_misc.inc b/config/snort/snort_check_cron_misc.inc index 72ede20c..b39d8d1c 100644 --- a/config/snort/snort_check_cron_misc.inc +++ b/config/snort/snort_check_cron_misc.inc @@ -209,7 +209,7 @@ if ($config['installedpackages']['snortglobal']['enable_log_mgmt'] == 'on') { } // Prune aged-out perfmon stats logs if any exist - if ($value['stats_log_retention'] > 0) { + if ($config['installedpackages']['snortglobal']['stats_log_retention'] > 0) { $now = time(); $files = array(); $list = glob("{$snort_log_dir}/*"); @@ -219,7 +219,7 @@ if ($config['installedpackages']['snortglobal']['enable_log_mgmt'] == 'on') { } $prune_count = 0; foreach ($files as $f) { - if (($now - filemtime($f)) > ($value['stats_log_retention'] * 3600)) { + if (($now - filemtime($f)) > ($config['installedpackages']['snortglobal']['stats_log_retention'] * 3600)) { $prune_count++; unlink_if_exists($f); } -- cgit v1.2.3