aboutsummaryrefslogtreecommitdiffstats
path: root/config/countryblock/countryblock.inc
diff options
context:
space:
mode:
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");