aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2006-10-07 05:41:50 +0000
committerScott Ullrich <sullrich@pfsense.org>2006-10-07 05:41:50 +0000
commitb76e1e42eea98235c251fafaecdbb1b2bfb4ae13 (patch)
tree96f74aac4c56c5462effa0bcddd5eccd94ebe10c
parentc19d7ff07712da1d05486c63875ad69179ecfb97 (diff)
downloadpfsense-packages-b76e1e42eea98235c251fafaecdbb1b2bfb4ae13.tar.gz
pfsense-packages-b76e1e42eea98235c251fafaecdbb1b2bfb4ae13.tar.bz2
pfsense-packages-b76e1e42eea98235c251fafaecdbb1b2bfb4ae13.zip
Move code to correct file. Doh.
-rw-r--r--packages/snort/snort_check_for_rule_updates.php14
-rw-r--r--packages/snort/snort_download_rules.php14
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'];