From c2bdfffc8d754f73a345b4f9cf1e8d21d7f9442f Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Sun, 13 Mar 2005 17:42:52 +0000 Subject: Add BKW's squid guard. --- packages/squid.xml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'packages/squid.xml') diff --git a/packages/squid.xml b/packages/squid.xml index 5367c995..5fbf9e30 100644 --- a/packages/squid.xml +++ b/packages/squid.xml @@ -9,7 +9,8 @@ echo "<pre>"; system("/bin/mkdir /usr/local/etc/squid"); - $lancfg = $config['interfaces']['lan']; + system("/usr/bin/touch /usr/local/etc/squid/mime.conf"); + $lancfg = $config['interfaces']['lan']; $lanif = $lancfg['if']; $lanip = $lancfg['ipaddr']; $lansa = gen_subnet($lancfg['ipaddr'], $lancfg['subnet']); @@ -34,6 +35,8 @@ fwrite($fout, "httpd_accel_port 80\n"); fwrite($fout, "httpd_accel_with_proxy on\n"); fwrite($fout, "httpd_accel_uses_host_header on\n"); + fwrite($fout, "cache_effective_user squid\n"); + fwrite($fout, "cache_effective_group squid\n"); fclose($fout); $fout = fopen("/usr/local/etc/rc.d/squid.sh","w"); fwrite($fout, "#!/bin/sh\n"); @@ -42,7 +45,6 @@ system("chmod a+x /usr/local/etc/rc.d/squid.sh"); system("/usr/local/sbin/squid -z"); system("/usr/local/sbin/squid"); - system("/usr/bin/touch /usr/local/etc/squid/mime.conf"); filter_configure(); /usr/local/sbin/squid @@ -50,11 +52,11 @@ exec("mv /var/db/pkg/squid* /tmp/"); filter_configure(); exec("mv /tmp/squid* /var/db/pkg/"); - exec("rm -rf /usr/local/squid/"); - exec("rm -rf /usr/local/etc/squid/"); - exec("rm -rf /usr/local/libexec/squid/"); - + - + exec("rm -rf /usr/local/squid/"); + exec("rm -rf /usr/local/etc/squid/"); + exec("rm -rf /usr/local/libexec/squid/"); + squid -- cgit v1.2.3