aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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.
*/