aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rwxr-xr-xconfig/ipblocklist/8/ipblocklist.inc8
-rwxr-xr-xconfig/ipblocklist/8/ipblocklist.tmp3
2 files changed, 8 insertions, 3 deletions
diff --git a/config/ipblocklist/8/ipblocklist.inc b/config/ipblocklist/8/ipblocklist.inc
index d3d5e1cd..7a32da7a 100755
--- a/config/ipblocklist/8/ipblocklist.inc
+++ b/config/ipblocklist/8/ipblocklist.inc
@@ -55,9 +55,8 @@ function php_install_command_ip()
//install PERL
- exec("setenv PACKAGESITE \"ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8-stable/Latest/\"");
- exec("pkg_add -r perl");
- exec("pkg_add -r p5-Net-CIDR");
+ 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.tbz");
//exec("pkg_add -r compat7x-i386.tbz");
//exec("pkg_add -r compat6x-i386.tbz");
exec("rehash");
@@ -111,6 +110,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();
diff --git a/config/ipblocklist/8/ipblocklist.tmp b/config/ipblocklist/8/ipblocklist.tmp
index 02f67c05..677158e2 100755
--- a/config/ipblocklist/8/ipblocklist.tmp
+++ b/config/ipblocklist/8/ipblocklist.tmp
@@ -56,6 +56,9 @@ if (count($_POST)>0) {
//Now clear ipfw, and process each list to ipfw commands
exec("/bin/sh convert-execute.sh");
+
+ //Attempt to create a backup of user lists
+ mwexec("cp /usr/local/www/packages/ipblocklist/lists.txt /usr/local/www/packages/ipbloclist_bkup/lists.txt");
}
else {