From 454caeb9c329afebdd5c238f577fb470951044a6 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Sat, 30 Sep 2006 19:24:19 +0000 Subject: Log when snort rules are being updated, or are updated. --- packages/snort/snort_check_for_rule_updates.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/snort/snort_check_for_rule_updates.php b/packages/snort/snort_check_for_rule_updates.php index 4127b514..ca118f9b 100644 --- a/packages/snort/snort_check_for_rule_updates.php +++ b/packages/snort/snort_check_for_rule_updates.php @@ -44,6 +44,7 @@ $date1ts = strtotime($last_update_date); $date2ts = strtotime($last_ruleset_download); /* is there a newer ruleset available? */ if($date1ts > $date2ts or !$last_ruleset_download) { + log_error("There is a new set of Snort rules posted. Downloading..."); if(!$oinkid) { log_error("Oinkid is not defined. We cannot automatically update the ruleset."); echo "Oinkid is not defined. We cannot automatically update the ruleset."; @@ -85,8 +86,10 @@ if($date1ts > $date2ts or !$last_ruleset_download) { /* cleanup temporary directory */ exec("/bin/rm -rf {$tmpfname};"); echo "Rules are now up to date.\n"; + log_error("Snort rules updated. New version: {$last_update_date}."); } else { echo "Rules are up to date.\n"; + log_error("Snort rules are up to date. Not updating."); } ?> \ No newline at end of file -- cgit v1.2.3