aboutsummaryrefslogtreecommitdiffstats
path: root/config/countryblock-dev
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
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')
-rwxr-xr-xconfig/countryblock-dev/countryblock.inc2
-rw-r--r--config/countryblock-dev/countryblock.php8
-rw-r--r--config/countryblock-dev/countryblock_sync.xml4
3 files changed, 7 insertions, 7 deletions
diff --git a/config/countryblock-dev/countryblock.inc b/config/countryblock-dev/countryblock.inc
index c17a5d9e..2040e176 100755
--- a/config/countryblock-dev/countryblock.inc
+++ b/config/countryblock-dev/countryblock.inc
@@ -1,6 +1,6 @@
<?php
/*
- postfix.inc
+ countryblock.inc
part of the Postfix package for pfSense
Copyright (C) 2010 Erik Fonnesbeck
Copyright (C) 2011 Marcello Coutinho
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.
*/
diff --git a/config/countryblock-dev/countryblock_sync.xml b/config/countryblock-dev/countryblock_sync.xml
index 627272e5..e026b636 100644
--- a/config/countryblock-dev/countryblock_sync.xml
+++ b/config/countryblock-dev/countryblock_sync.xml
@@ -7,8 +7,8 @@
/* $Id$ */
/* ========================================================================== */
/*
- postfix_sync.xml
- part of the Postfix package for pfSense
+ Countryblock_sync.xml
+ part of the Countryblock package for pfSense
Copyright (C) 2011 Marcello Coutinho
All rights reserved.
*/