From 26e504fbacb47031869a7ab204bcd54e54315c15 Mon Sep 17 00:00:00 2001 From: Thomas Schaefer Date: Sun, 2 Oct 2011 19:55:56 -0400 Subject: Remove email and create user backup --- config/countryblock/countryblock.inc | 5 +++++ config/countryblock/countryblock.tmp | 5 ++++- config/countryblock/countryblock_if.tmp | 2 +- config/countryblock/help.tmp | 4 ++-- config/countryblock/settings.tmp | 2 +- config/countryblock/whitelist.tmp | 2 +- pkg_config.7.xml | 2 +- pkg_config.8.xml | 2 +- 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); ?> 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); ?> 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); ?> @@ -91,7 +91,7 @@ To run countryblock as a cron job use /usr/local/etc/rc.d/countryblock.sh
Warning! - Apply after every firewall change or state reset. Use at your own risk. ---> -Please see wiki for help +Please see wiki for help or the Forum 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); ?> 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); ?> 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 @@ http://forum.pfsense.org/index.php/topic,25732.0.html http://pfsense.org/packages/config/countryblock/countryblock.xml http://files.pfsense.org/packages/7/All/ - 0.2.2 + 0.2.3 Beta 1.2.2 tom@tomschaefer.org 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 @@ http://forum.pfsense.org/index.php/topic,25732.0.html http://pfsense.org/packages/config/countryblock/countryblock.xml http://files.pfsense.org/packages/7/All/ - 0.2.2 + 0.2.3 Beta 2.0 tom@tomschaefer.org 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 @@ http://forum.pfsense.org/index.php/topic,25732.0.html http://pfsense.org/packages/config/countryblock/countryblock.xml http://files.pfsense.org/packages/amd64/8/All/ - 0.2.2 + 0.2.3 Beta 2.0 tom@tomschaefer.org -- cgit v1.2.3