aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2015-02-04 17:37:35 -0200
committerRenato Botelho <garga@FreeBSD.org>2015-02-04 17:37:35 -0200
commitb0900909335e718e4c7a5ffba58a9a6eccd51728 (patch)
tree9c17632cb96be3b5e1152d8578b53dccecf7befa
parent147eb50a74df7b601ed1ada77fa6b255abcdda52 (diff)
parent8cbf13a1f5fecc0df9cb319842537243be94266d (diff)
downloadpfsense-packages-b0900909335e718e4c7a5ffba58a9a6eccd51728.tar.gz
pfsense-packages-b0900909335e718e4c7a5ffba58a9a6eccd51728.tar.bz2
pfsense-packages-b0900909335e718e4c7a5ffba58a9a6eccd51728.zip
Merge pull request #808 from BBcan177/pfBlockerNG_020315_1
-rw-r--r--config/pfblockerng/pfblockerng.inc37
-rw-r--r--config/pfblockerng/pfblockerng.php6
-rw-r--r--pkg_config.10.xml2
3 files changed, 26 insertions, 19 deletions
diff --git a/config/pfblockerng/pfblockerng.inc b/config/pfblockerng/pfblockerng.inc
index 66b5a313..0eb3ff43 100644
--- a/config/pfblockerng/pfblockerng.inc
+++ b/config/pfblockerng/pfblockerng.inc
@@ -350,13 +350,21 @@ function sync_package_pfblockerng($cron = "") {
}
log_error("[pfBlockerNG] Starting sync process.");
+ // Force Update - Set 'Save' variable when 'No Updates' found.
+ if ($cron == "noupdates") {
+ $pfb['save'] = TRUE;
+ }
+
# Start of pfBlockerNG Logging to 'pfblockerng.log'
if ($pfb['enable'] == "on" && !$pfb['save']) {
$log = " UPDATE PROCESS START [ NOW ]\n";
+ pfb_logger("{$log}","1");
} else {
- $log = "\n**Saving Configuration [ NOW ] ...\n";
+ if ($cron != "noupdates") {
+ $log = "\n**Saving Configuration [ NOW ] ...\n";
+ pfb_logger("{$log}","1");
+ }
}
- pfb_logger("{$log}","1");
# TBC if Required ! (Fetch Timeout in 2.2)
@@ -2561,18 +2569,19 @@ function pfblockerng_do_xmlrpc_sync($sync_to_ip, $port, $protocol, $username, $p
$xml = array();
// If User Disabled, remove 'General Tab Customizations' from Sync
if ($config['installedpackages']['pfblockerngsync']['config'][0]['syncinterfaces'] == "")
- $xml['pfblockerng'] = $config['installedpackages']['pfblockerng'];
- $xml['pfblockerngreputation'] = $config['installedpackages']['pfblockerngreputation'];
- $xml['pfblockernglistsv4'] = $config['installedpackages']['pfblockernglistsv4'];
- $xml['pfblockernglistsv6'] = $config['installedpackages']['pfblockernglistsv6'];
- $xml['pfblockerngtopspammers'] = $config['installedpackages']['pfblockerngtopspammers'];
- $xml['pfblockerngafrica'] = $config['installedpackages']['pfblockerngafrica'];
- $xml['pfblockerngantartica'] = $config['installedpackages']['pfblockerngantartica'];
- $xml['pfblockerngasia'] = $config['installedpackages']['pfblockerngasia'];
- $xml['pfblockerngeurope'] = $config['installedpackages']['pfblockerngeurope'];
- $xml['pfblockerngnorthamerica'] = $config['installedpackages']['pfblockerngnorthamerica'];
- $xml['pfblockerngoceania'] = $config['installedpackages']['pfblockerngoceania'];
- $xml['pfblockerngsouthamerica'] = $config['installedpackages']['pfblockerngsouthamerica'];
+ $xml['pfblockerng'] = $config['installedpackages']['pfblockerng'];
+ $xml['pfblockerngreputation'] = $config['installedpackages']['pfblockerngreputation'];
+ $xml['pfblockernglistsv4'] = $config['installedpackages']['pfblockernglistsv4'];
+ $xml['pfblockernglistsv6'] = $config['installedpackages']['pfblockernglistsv6'];
+ $xml['pfblockerngtopspammers'] = $config['installedpackages']['pfblockerngtopspammers'];
+ $xml['pfblockerngafrica'] = $config['installedpackages']['pfblockerngafrica'];
+ $xml['pfblockerngantartica'] = $config['installedpackages']['pfblockerngantartica'];
+ $xml['pfblockerngasia'] = $config['installedpackages']['pfblockerngasia'];
+ $xml['pfblockerngeurope'] = $config['installedpackages']['pfblockerngeurope'];
+ $xml['pfblockerngnorthamerica'] = $config['installedpackages']['pfblockerngnorthamerica'];
+ $xml['pfblockerngoceania'] = $config['installedpackages']['pfblockerngoceania'];
+ $xml['pfblockerngsouthamerica'] = $config['installedpackages']['pfblockerngsouthamerica'];
+ $xml['pfblockerngproxyandsatellite'] = $config['installedpackages']['pfblockerngproxyandsatellite'];
/* assemble xmlrpc payload */
$params = array(
diff --git a/config/pfblockerng/pfblockerng.php b/config/pfblockerng/pfblockerng.php
index ca8a23a9..0ca3aa7d 100644
--- a/config/pfblockerng/pfblockerng.php
+++ b/config/pfblockerng/pfblockerng.php
@@ -418,13 +418,11 @@ if ($argv[1] == 'cron') {
if ($pfb['update_cron']) {
sync_package_pfblockerng("cron");
} else {
- $log = "\n No Updates required. \n\n";
+ sync_package_pfblockerng("noupdates");
+ $log = "\n No Updates required.\n CRON PROCESS ENDED\n UPDATE PROCESS ENDED\n";
pfb_logger("{$log}","1");
}
- $log = " CRON PROCESS ENDED [ NOW ]\n";
- pfb_logger("{$log}","1");
-
# Call Log Mgmt Function
// If Update GUI 'Manual view' is selected. Last output will be missed. So sleep for 5 secs.
sleep(5);
diff --git a/pkg_config.10.xml b/pkg_config.10.xml
index 0b506a10..48b2adc5 100644
--- a/pkg_config.10.xml
+++ b/pkg_config.10.xml
@@ -117,7 +117,7 @@
<category>Firewall</category>
<pkginfolink>https://forum.pfsense.org/index.php?topic=86212.0</pkginfolink>
<config_file>https://packages.pfsense.org/packages/config/pfblockerng/pfblockerng.xml</config_file>
- <version>1.02</version>
+ <version>1.03</version>
<status>Beta</status>
<required_version>2.2</required_version>
<maintainer>BBCan177@gmail.com</maintainer>