aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorBBcan177 <bbcan177@gmail.com>2015-12-20 15:51:37 -0500
committerBBcan177 <bbcan177@gmail.com>2015-12-20 15:51:37 -0500
commit47649151b8856ede50c22f4d1f7f26e8866c5e69 (patch)
treeb7e105af89a0c05a187bd6ba3a860902a2469ee3 /config
parent58e08794fd1ea5c2ab3d64dc7492a90725f4f143 (diff)
downloadpfsense-packages-47649151b8856ede50c22f4d1f7f26e8866c5e69.tar.gz
pfsense-packages-47649151b8856ede50c22f4d1f7f26e8866c5e69.tar.bz2
pfsense-packages-47649151b8856ede50c22f4d1f7f26e8866c5e69.zip
Update pfblockerng.inc
* Mod to DNSBL Reload (Background function call)
Diffstat (limited to 'config')
-rw-r--r--config/pfblockerng/pfblockerng.inc18
1 files changed, 11 insertions, 7 deletions
diff --git a/config/pfblockerng/pfblockerng.inc b/config/pfblockerng/pfblockerng.inc
index afd7a0ce..4ec46d85 100644
--- a/config/pfblockerng/pfblockerng.inc
+++ b/config/pfblockerng/pfblockerng.inc
@@ -1784,6 +1784,7 @@ function sync_package_pfblockerng($cron='') {
// Reloads existing lists without downloading new lists when defined 'on'
$pfb['reuse'] = $pfb['config']['pfb_reuse'];
$pfb['reuse_dnsbl'] = '';
+ $pfb['updatednsbl'] = FALSE; // Set flag to allow DNSBL Reload, only when called via background cmd.
// Define update process (update or reload)
switch ($cron) {
@@ -1801,6 +1802,7 @@ function sync_package_pfblockerng($cron='') {
case 'updatednsbl':
$pfb['reuse'] = '';
$pfb['reuse_dnsbl'] = 'on';
+ $pfb['updatednsbl'] = TRUE;
break;
case 'updateip':
$pfb['reuse'] = 'on';
@@ -2304,13 +2306,15 @@ function sync_package_pfblockerng($cron='') {
$dnsbl_error = TRUE;
}
- // Determine if a DNSBL Reload is running
- $result_cron = array();
- exec('/bin/ps -wax', $result_cron);
- if (preg_grep("/pfblockerng[.]php\s+?(updatednsbl)/", $result_cron)) {
- $log = "\n ** DNSBL Update Terminated due to active pfBlockerNG cron process\n";
- pfb_logger("{$log}", 1);
- $dnsbl_error = TRUE;
+ if (!$pfb['updatednsbl']) {
+ // Determine if a DNSBL Reload is running
+ $result_cron = array();
+ exec('/bin/ps -wax', $result_cron);
+ if (preg_grep("/pfblockerng[.]php\s+?(updatednsbl)/", $result_cron)) {
+ $log = "\n ** DNSBL Reload Terminated due to active pfBlockerNG cron process\n";
+ pfb_logger("{$log}", 1);
+ $dnsbl_error = TRUE;
+ }
}
}