aboutsummaryrefslogtreecommitdiffstats
path: root/config/countryblock
diff options
context:
space:
mode:
authorThomas Schaefer <tom@tomschaefer.org>2011-10-02 19:55:56 -0400
committerThomas Schaefer <tom@tomschaefer.org>2011-10-02 19:55:56 -0400
commit26e504fbacb47031869a7ab204bcd54e54315c15 (patch)
tree5f801f70fd682e4eb68fd4160a36da4ea9cb1e42 /config/countryblock
parent7dda215e41a7deb3a6e1a7b314114ef52af8d4bf (diff)
downloadpfsense-packages-26e504fbacb47031869a7ab204bcd54e54315c15.tar.gz
pfsense-packages-26e504fbacb47031869a7ab204bcd54e54315c15.tar.bz2
pfsense-packages-26e504fbacb47031869a7ab204bcd54e54315c15.zip
Remove email and create user backup
Diffstat (limited to 'config/countryblock')
-rw-r--r--config/countryblock/countryblock.inc5
-rw-r--r--config/countryblock/countryblock.tmp5
-rw-r--r--config/countryblock/countryblock_if.tmp2
-rw-r--r--config/countryblock/help.tmp4
-rw-r--r--config/countryblock/settings.tmp2
-rw-r--r--config/countryblock/whitelist.tmp2
6 files changed, 14 insertions, 6 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>