diff options
-rw-r--r-- | config/countryblock/countryblock.inc | 5 | ||||
-rw-r--r-- | config/countryblock/countryblock.tmp | 5 | ||||
-rw-r--r-- | config/countryblock/countryblock_if.tmp | 2 | ||||
-rw-r--r-- | config/countryblock/help.tmp | 4 | ||||
-rw-r--r-- | config/countryblock/settings.tmp | 2 | ||||
-rw-r--r-- | config/countryblock/whitelist.tmp | 2 | ||||
-rwxr-xr-x | pkg_config.7.xml | 2 | ||||
-rw-r--r-- | pkg_config.8.xml | 2 | ||||
-rw-r--r-- | pkg_config.8.xml.amd64 | 2 |
9 files changed, 17 insertions, 9 deletions
diff --git a/config/countryblock/countryblock.inc b/config/countryblock/countryblock.inc index f67fd76f..79b223ce 100644 --- a/config/countryblock/countryblock.inc +++ b/config/countryblock/countryblock.inc @@ -114,6 +114,10 @@ function php_install_command_cb() exec("mkdir /usr/local/www/packages/countryblock/lists"); exec("touch /usr/local/www/packages/countryblock/lists/countries.txt"); + //Attempt to restore from backup + exec("mkdir /usr/local/www/packages/countryblock_bkup"); + exec("cp /usr/local/www/packages/countryblock_bkup/countries.txt /usr/local/www/packages/countryblock/countries.txt"); + conf_mount_ro(); config_unlock(); } @@ -125,6 +129,7 @@ function deinstall_command_cb() $handle = popen("/usr/local/etc/rc.d/countryblock.sh stop", "r"); unlink_if_exists("/usr/local/pkg/countryblock.xml"); unlink_if_exists("/usr/local/pkg/countryblock.inc"); + //unlink_if_exists("/usr/local/pkg/pf/countryblock.sh"); exec("rm -R /usr/local/www/packages/countryblock/countryblocks"); exec("rm -R /usr/local/www/packages/countryblock"); exec("rm /usr/local/etc/rc.d/countryblock.sh"); diff --git a/config/countryblock/countryblock.tmp b/config/countryblock/countryblock.tmp index 0ddb4c5f..39ee6e64 100644 --- a/config/countryblock/countryblock.tmp +++ b/config/countryblock/countryblock.tmp @@ -60,6 +60,9 @@ if (count($_POST)>0) { //mwexec("pfctl -t countryblock -T kill"); //mwexec("sed -i -e '/countryblock/d' /tmp/rules.debug"); mwexec("sh execute.sh"); + + //attempt to create a backup of countries.txt + mwexec("cp /usr/local/www/packages/countryblock/countries.txt /usr/local/www/packages/countryblock_bkup/countries.txt"); } else { @@ -118,7 +121,7 @@ else { $tab_array[2] = array("Whitelist", false, "whitelist.php"); $tab_array[3] = array("Interfaces", false, "countryblock_if.php"); $tab_array[4] = array("Help", false, "help.php"); - $tab_array[5] = array("Email", false, "email.php"); + //$tab_array[5] = array("Email", false, "email.php"); display_top_tabs($tab_array); ?> </td></tr> diff --git a/config/countryblock/countryblock_if.tmp b/config/countryblock/countryblock_if.tmp index 8471f075..65b80992 100644 --- a/config/countryblock/countryblock_if.tmp +++ b/config/countryblock/countryblock_if.tmp @@ -122,7 +122,7 @@ include("head.inc"); $tab_array[2] = array("Whitelist", false, "whitelist.php"); $tab_array[3] = array("Interfaces", true, "countryblock_if.php"); $tab_array[4] = array("Help", false, "help.php"); - $tab_array[5] = array("Email", false, "email.php"); + //$tab_array[5] = array("Email", false, "email.php"); display_top_tabs($tab_array); ?> </td></tr> diff --git a/config/countryblock/help.tmp b/config/countryblock/help.tmp index 17f30f90..2f466947 100644 --- a/config/countryblock/help.tmp +++ b/config/countryblock/help.tmp @@ -34,7 +34,7 @@ $pgtitle = "Firewall: Countryblock - Help"; $tab_array[2] = array("Whitelist", false, "whitelist.php"); $tab_array[3] = array("Interfaces", false, "countryblock_if.php"); $tab_array[4] = array("Help", true, "help.php"); - $tab_array[5] = array("Email", false, "email.php"); + //$tab_array[5] = array("Email", false, "email.php"); display_top_tabs($tab_array); ?> </td></tr> @@ -91,7 +91,7 @@ To run countryblock as a cron job use /usr/local/etc/rc.d/countryblock.sh <br> <span style="color:red">Warning!</span> - Apply after every firewall change or state reset. Use at your own risk. ---> -<a href="http://doc.pfsense.org/index.php/Country_Block">Please see wiki for help</a> +<a href="http://doc.pfsense.org/index.php/Country_Block">Please see wiki for help</a> or the <a href="http://forum.pfsense.org/index.php/topic,25732.0.html">Forum</a> </div> diff --git a/config/countryblock/settings.tmp b/config/countryblock/settings.tmp index 5bbfedc3..0a067d83 100644 --- a/config/countryblock/settings.tmp +++ b/config/countryblock/settings.tmp @@ -44,7 +44,7 @@ $pgtitle = "Firewall: Countryblock - Settings"; $tab_array[2] = array("Whitelist", false, "whitelist.php"); $tab_array[3] = array("Interfaces", false, "countryblock_if.php"); $tab_array[4] = array("Help", false, "help.php"); - $tab_array[5] = array("Email", false, "email.php"); + //$tab_array[5] = array("Email", false, "email.php"); display_top_tabs($tab_array); ?> </td></tr> diff --git a/config/countryblock/whitelist.tmp b/config/countryblock/whitelist.tmp index 0dbed5d0..d613ee11 100644 --- a/config/countryblock/whitelist.tmp +++ b/config/countryblock/whitelist.tmp @@ -43,7 +43,7 @@ mwexec("touch countries-white.txt"); $tab_array[2] = array("Whitelist", true, "whitelist.php"); $tab_array[3] = array("Interfaces", false, "countryblock_if.php"); $tab_array[4] = array("Help", false, "help.php"); - $tab_array[5] = array("Email", false, "email.php"); + //$tab_array[5] = array("Email", false, "email.php"); display_top_tabs($tab_array); ?> </td></tr> diff --git a/pkg_config.7.xml b/pkg_config.7.xml index 6d9b5ebc..c1431fa7 100755 --- a/pkg_config.7.xml +++ b/pkg_config.7.xml @@ -23,7 +23,7 @@ <pkginfolink>http://forum.pfsense.org/index.php/topic,25732.0.html</pkginfolink> <config_file>http://pfsense.org/packages/config/countryblock/countryblock.xml</config_file> <depends_on_package_base_url>http://files.pfsense.org/packages/7/All/</depends_on_package_base_url> - <version>0.2.2</version> + <version>0.2.3</version> <status>Beta</status> <required_version>1.2.2</required_version> <maintainer>tom@tomschaefer.org</maintainer> diff --git a/pkg_config.8.xml b/pkg_config.8.xml index eb22da6f..07916686 100644 --- a/pkg_config.8.xml +++ b/pkg_config.8.xml @@ -52,7 +52,7 @@ <pkginfolink>http://forum.pfsense.org/index.php/topic,25732.0.html</pkginfolink> <config_file>http://pfsense.org/packages/config/countryblock/countryblock.xml</config_file> <depends_on_package_base_url>http://files.pfsense.org/packages/7/All/</depends_on_package_base_url> - <version>0.2.2</version> + <version>0.2.3</version> <status>Beta</status> <required_version>2.0</required_version> <maintainer>tom@tomschaefer.org</maintainer> diff --git a/pkg_config.8.xml.amd64 b/pkg_config.8.xml.amd64 index 67662bd5..91392ce4 100644 --- a/pkg_config.8.xml.amd64 +++ b/pkg_config.8.xml.amd64 @@ -108,7 +108,7 @@ <pkginfolink>http://forum.pfsense.org/index.php/topic,25732.0.html</pkginfolink> <config_file>http://pfsense.org/packages/config/countryblock/countryblock.xml</config_file> <depends_on_package_base_url>http://files.pfsense.org/packages/amd64/8/All/</depends_on_package_base_url> - <version>0.2.2</version> + <version>0.2.3</version> <status>Beta</status> <required_version>2.0</required_version> <maintainer>tom@tomschaefer.org</maintainer> |