From b76e1e42eea98235c251fafaecdbb1b2bfb4ae13 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Sat, 7 Oct 2006 05:41:50 +0000 Subject: Move code to correct file. Doh. --- packages/snort/snort_check_for_rule_updates.php | 14 ++++++++++++++ packages/snort/snort_download_rules.php | 14 -------------- 2 files changed, 14 insertions(+), 14 deletions(-) (limited to 'packages/snort') diff --git a/packages/snort/snort_check_for_rule_updates.php b/packages/snort/snort_check_for_rule_updates.php index ca118f9b..fc27eb83 100644 --- a/packages/snort/snort_check_for_rule_updates.php +++ b/packages/snort/snort_check_for_rule_updates.php @@ -36,6 +36,20 @@ require_once("functions.inc"); require_once("/usr/local/pkg/snort.inc"); require_once("service-utils.inc"); +/* check to see if carp settings exist, and get a handle */ +if($config['installedpackages']['carpsettings']) { + $carp = &$config['installedpackages']['carpsettings']['config'][0]; + $password = $carp['password']; +} + +/* if we are not a CARP cluster master, sleep for a random + * amount of time allowing for other members to download the configuration + */ +if(!$password) { + $sleepietime = rand(5,700); + sleep($sleepietime); +} + $last_ruleset_download = $config['installedpackages']['snort']['last_ruleset_download']; $text = file_get_contents("http://www.snort.org/pub-bin/downloads.cgi"); if (preg_match_all("/.*RELEASED\: (.*)\