aboutsummaryrefslogtreecommitdiffstats
path: root/config/countryblock-dev/countryblock.php
diff options
context:
space:
mode:
authorMarcello Coutinho <marcellocoutinho@gmail.com>2011-10-25 19:08:35 -0200
committermarcelloc <marcellocoutinho@gmail.com>2011-10-25 19:08:35 -0200
commit8d9d9a5c91036f0610a05f34fb4df4aa8bf19d7f (patch)
tree2e8bda0cb927513283046d8098195b77ad08c7a3 /config/countryblock-dev/countryblock.php
parentdbbc2d6e11a770fa786e4bd3a26fb4c6c6684f76 (diff)
downloadpfsense-packages-8d9d9a5c91036f0610a05f34fb4df4aa8bf19d7f.tar.gz
pfsense-packages-8d9d9a5c91036f0610a05f34fb4df4aa8bf19d7f.tar.bz2
pfsense-packages-8d9d9a5c91036f0610a05f34fb4df4aa8bf19d7f.zip
countryblock - fix some file info.
Diffstat (limited to 'config/countryblock-dev/countryblock.php')
-rw-r--r--config/countryblock-dev/countryblock.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/config/countryblock-dev/countryblock.php b/config/countryblock-dev/countryblock.php
index 26b454d5..c93a7f35 100644
--- a/config/countryblock-dev/countryblock.php
+++ b/config/countryblock-dev/countryblock.php
@@ -24,6 +24,8 @@ $files= array ( "Africa" => "/usr/loca/pkg/Africa_cidr.txt",
"Oceania" => "/usr/loca/pkg/Oceania_cidr.txt",
"South America"=>"/usr/loca/pkg/South_America_cidr.txt");
$cdir='/usr/local/pkg/countryblock';
+if (! is_dir($cdir))
+ mkdir ($cdir,0755);
foreach ($files as $cont => $file){
$ips=file_get_contents($file);
$convert = explode("\n", $ips);
@@ -34,8 +36,6 @@ foreach ($files as $cont => $file){
foreach ($convert as $line){
if (preg_match('/#(.*):\s+(.*)$/',$line,$matches)){
if ($ISOCode <> "" && $ISOCode <> $matches[2] && preg_match("/ISO Code/",$line)){
- if (! is_dir($cdir))
- mkdir ($cdir,755);
file_put_contents($cdir.'/'.$ISOCode.'.txt',${$ISOCode},LOCK_EX);
$total++;
}
@@ -61,8 +61,8 @@ $xml= <<<EOF
/* \$Id$ */
/* ========================================================================== */
/*
- postfix_{$cont_name}.xml
- part of the Postfix package for pfSense
+ countryblock_{$cont_name}.xml
+ part of the Countryblock package for pfSense
Copyright (C) 2011 Marcello Coutinho
All rights reserved.
*/