aboutsummaryrefslogtreecommitdiffstats
path: root/config/countryblock/countryblock.inc
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/countryblock.inc
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/countryblock.inc')
-rw-r--r--config/countryblock/countryblock.inc5
1 files changed, 5 insertions, 0 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");