diff options
author | Martin Fuchs <martin.fuchs@trendchiller.com> | 2011-10-04 15:56:17 +0200 |
---|---|---|
committer | Martin Fuchs <martin.fuchs@trendchiller.com> | 2011-10-04 15:56:17 +0200 |
commit | 221cb3e812db32a687b3f381bb74e9df61311872 (patch) | |
tree | 65a78497c87b43eaa18c28830dc957ce195ebdc4 /config/countryblock/countryblock.inc | |
parent | 42b72a5b9995b92c6d6b5e8217484f3d8cd4559b (diff) | |
parent | e178ef94bf3930b9a9bc5e0f563bc0412ae1cee6 (diff) | |
download | pfsense-packages-221cb3e812db32a687b3f381bb74e9df61311872.tar.gz pfsense-packages-221cb3e812db32a687b3f381bb74e9df61311872.tar.bz2 pfsense-packages-221cb3e812db32a687b3f381bb74e9df61311872.zip |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'config/countryblock/countryblock.inc')
-rw-r--r-- | config/countryblock/countryblock.inc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/config/countryblock/countryblock.inc b/config/countryblock/countryblock.inc index f67fd76f..64c1f4cc 100644 --- a/config/countryblock/countryblock.inc +++ b/config/countryblock/countryblock.inc @@ -62,6 +62,9 @@ function php_install_command_cb() //rename PHP files from .tmp to .php + exec("cp /tmp/countryblock_IPBlocklist.widget.tmp /usr/local/www/widgets/widgets/countryblock_IPBlocklist.widget.php"); + unlink_if_exists("/tmp/countryblock_IPBlocklist.widget.tmp"); + exec("cp /tmp/class.phpmailer.tmp /usr/local/www/packages/countryblock/class.phpmailer.php"); unlink_if_exists("/tmp/class.phpmailer.tmp "); exec("cp /tmp/class.smtp.tmp /usr/local/www/packages/countryblock/class.smtp.php"); @@ -114,6 +117,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 +132,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"); |