From c7f59df06f608245bbc8ea657ff8ce93bd64e796 Mon Sep 17 00:00:00 2001 From: bmeeks8 Date: Wed, 1 Jan 2014 17:06:10 -0500 Subject: Add new param to tail command to fix date sorting --- config/snort/snort_alerts.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'config/snort') diff --git a/config/snort/snort_alerts.php b/config/snort/snort_alerts.php index ede6cf9a..2b957f61 100755 --- a/config/snort/snort_alerts.php +++ b/config/snort/snort_alerts.php @@ -379,7 +379,7 @@ if ($pconfig['arefresh'] == 'on') /* make sure alert file exists */ if (file_exists("/var/log/snort/snort_{$if_real}{$snort_uuid}/alert")) { - exec("tail -{$anentries} /var/log/snort/snort_{$if_real}{$snort_uuid}/alert | sort -r > /tmp/alert_{$snort_uuid}"); + exec("tail -{$anentries} -r /var/log/snort/snort_{$if_real}{$snort_uuid}/alert > /tmp/alert_{$snort_uuid}"); if (file_exists("/tmp/alert_{$snort_uuid}")) { $tmpblocked = array_flip(snort_get_blocked_ips()); $counter = 0; -- cgit v1.2.3