diff options
author | Renato Botelho <garga@FreeBSD.org> | 2015-02-04 17:37:35 -0200 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2015-02-04 17:37:35 -0200 |
commit | b0900909335e718e4c7a5ffba58a9a6eccd51728 (patch) | |
tree | 9c17632cb96be3b5e1152d8578b53dccecf7befa /config/pfblockerng | |
parent | 147eb50a74df7b601ed1ada77fa6b255abcdda52 (diff) | |
parent | 8cbf13a1f5fecc0df9cb319842537243be94266d (diff) | |
download | pfsense-packages-b0900909335e718e4c7a5ffba58a9a6eccd51728.tar.gz pfsense-packages-b0900909335e718e4c7a5ffba58a9a6eccd51728.tar.bz2 pfsense-packages-b0900909335e718e4c7a5ffba58a9a6eccd51728.zip |
Merge pull request #808 from BBcan177/pfBlockerNG_020315_1
Diffstat (limited to 'config/pfblockerng')
-rw-r--r-- | config/pfblockerng/pfblockerng.inc | 37 | ||||
-rw-r--r-- | config/pfblockerng/pfblockerng.php | 6 |
2 files changed, 25 insertions, 18 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); |