diff options
Diffstat (limited to 'packages/snort')
-rw-r--r-- | packages/snort/snort_check_for_rule_updates.php | 14 | ||||
-rw-r--r-- | packages/snort/snort_download_rules.php | 14 |
2 files changed, 14 insertions, 14 deletions
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\: (.*)\</", $text, $matches)) diff --git a/packages/snort/snort_download_rules.php b/packages/snort/snort_download_rules.php index 7495a1d9..872bafe9 100644 --- a/packages/snort/snort_download_rules.php +++ b/packages/snort/snort_download_rules.php @@ -39,20 +39,6 @@ if(!$start_me_up) { $pgtitle = "Services: Snort: Update Rules"; -/* 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); -} - /* define oinkid */ if($config['installedpackages']['snort']) $oinkid = $config['installedpackages']['snort']['config'][0]['oinkmastercode']; |