aboutsummaryrefslogtreecommitdiffstats
path: root/packages/squid.xml
diff options
context:
space:
mode:
Diffstat (limited to 'packages/squid.xml')
-rw-r--r--packages/squid.xml16
1 files changed, 9 insertions, 7 deletions
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 @@
<custom_php_install_command>
echo "&lt;pre&gt;";
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();
</custom_php_install_command>
<start_command>/usr/local/sbin/squid</start_command>
@@ -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/");
- </custom_php_pre_deinstall_command>
+ </custom_php_pre_deinstall_command>
<custom_php_deinstall_command>
- </custom_php_deinstall_command>
+ exec("rm -rf /usr/local/squid/");
+ exec("rm -rf /usr/local/etc/squid/");
+ exec("rm -rf /usr/local/libexec/squid/");
+ </custom_php_deinstall_command>
<process_kill_command>squid</process_kill_command>
</packagegui>