aboutsummaryrefslogtreecommitdiffstats
path: root/config/pfblockerng/pfblockerng.inc
diff options
context:
space:
mode:
authorBBcan177 <bbcan177@gmail.com>2015-05-25 00:10:23 -0400
committerBBcan177 <bbcan177@gmail.com>2015-05-25 00:10:23 -0400
commit48d6105a64015ad0f547da90da150b030cbb26fd (patch)
tree630e022f8e307156aba53ac39b595e157fae5f11 /config/pfblockerng/pfblockerng.inc
parent33ff3e6f91d8efadfafc1317640fc2d509d282c4 (diff)
downloadpfsense-packages-48d6105a64015ad0f547da90da150b030cbb26fd.tar.gz
pfsense-packages-48d6105a64015ad0f547da90da150b030cbb26fd.tar.bz2
pfsense-packages-48d6105a64015ad0f547da90da150b030cbb26fd.zip
pfBlockerNG v1.09 Maxmind Cron Task and addedit_string
The cron comparison function must skip the hour comparison for the Maxmind Cron task due to the hour being randomized (0-23). Add "addedit_string" to XML files. This will give description to the config backups.
Diffstat (limited to 'config/pfblockerng/pfblockerng.inc')
-rw-r--r--config/pfblockerng/pfblockerng.inc6
1 files changed, 5 insertions, 1 deletions
diff --git a/config/pfblockerng/pfblockerng.inc b/config/pfblockerng/pfblockerng.inc
index b67f681f..379ce223 100644
--- a/config/pfblockerng/pfblockerng.inc
+++ b/config/pfblockerng/pfblockerng.inc
@@ -263,6 +263,10 @@ function pfblockerng_cron_exists($crontask, $pfb_min, $pfb_hour) {
if ($item['minute'] != $pfb_min) {
return FALSE;
}
+ if ($pfb_hour == 'maxmind' && !empty($item['hour'])) {
+ // Maxmind hour is randomized. Skip comparison.
+ return TRUE;
+ }
if ($item['hour'] != $pfb_hour) {
return FALSE;
}
@@ -2662,7 +2666,7 @@ function sync_package_pfblockerng($cron = "") {
$pfb_gwho = "root";
// Determine if Cron Task requires updating
- if (!pfblockerng_cron_exists($pfb_gcmd, $pfb_gmin, $pfb_ghour)) {
+ if (!pfblockerng_cron_exists($pfb_gcmd, $pfb_gmin, 'maxmind')) {
install_cron_job($pfb_gcmd, true, $pfb_gmin, $pfb_ghour, $pfb_gmday, $pfb_gmonth, $pfb_gwday, $pfb_gwho);
}
}