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/ipblocklist/8/ipblocklist.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/ipblocklist/8/ipblocklist.inc')
-rwxr-xr-x | config/ipblocklist/8/ipblocklist.inc | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/config/ipblocklist/8/ipblocklist.inc b/config/ipblocklist/8/ipblocklist.inc index 003f28bf..545cb4ab 100755 --- a/config/ipblocklist/8/ipblocklist.inc +++ b/config/ipblocklist/8/ipblocklist.inc @@ -55,12 +55,16 @@ function php_install_command_ip() //install PERL - exec("pkg_add -r perl"); - exec("pkg_add -r p5-Net-CIDR"); - exec("pkg_add -r compat7x-i386.tbz"); - exec("pkg_add -r compat6x-i386.tbz"); + exec("pkg_add -r ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8-stable/All/perl-5.12.4_2.tbz"); + exec("pkg_add -r ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8-stable/All/p5-Net-CIDR-0.14.tbz"); + //exec("pkg_add -r compat7x-i386.tbz"); + //exec("pkg_add -r compat6x-i386.tbz"); + exec("rehash"); //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/lists.txt /usr/local/www/packages/ipblocklist/lists.txt"); exec("cp /tmp/class.phpmailer.tmp /usr/local/www/packages/ipblocklist/class.phpmailer.php"); unlink_if_exists("/tmp/class.phpmailer.tmp "); @@ -109,6 +113,9 @@ function php_install_command_ip() exec("/usr/bin/touch /usr/local/www/packages/ipblocklist/OUTBOUND"); + //Attempt to pull from a backup + exec("/bin/mkdir /usr/local/www/packages/ipblocklist_bkup"); + exec("cp /usr/local/www/packages/ipblocklist_bkup/lists.txt /usr/local/www/packages/ipblocklist/lists.txt"); conf_mount_ro(); config_unlock(); @@ -121,11 +128,12 @@ function deinstall_command_ip() $handle = popen("/usr/local/etc/rc.d/ipblocklist.sh stop", "r"); unlink_if_exists("/usr/local/pkg/ipblocklist.xml"); unlink_if_exists("/usr/local/pkg/ipblocklist.inc"); + unlink_if_exists("/usr/local/pkg/pf/IP-Blocklist.sh"); exec("rm -R /usr/local/www/packages/ipblocklist/ipblocklists"); exec("rm -R /usr/local/www/packages/ipblocklist"); exec("rm /usr/local/etc/rc.d/IP-Blocklist.sh"); exec("pfctl -t ipblocklist -T kill"); - exec("ipfw -f flush"); + //exec("ipfw -f flush"); conf_mount_ro(); } |