From df52a985406a3d4fd2f9e4a5b2666596569cf53c Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Sat, 7 Oct 2006 03:59:50 +0000 Subject: If we are not a cluster master, sleep between 5 and 700 minutes before invoking the upgrade to give other servers time and this also prevents snort.org from being pounded quite so hard. --- packages/snort/snort_download_rules.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/packages/snort/snort_download_rules.php b/packages/snort/snort_download_rules.php index ef80edeb..5ffd1a8d 100644 --- a/packages/snort/snort_download_rules.php +++ b/packages/snort/snort_download_rules.php @@ -40,6 +40,20 @@ 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']; -- cgit v1.2.3