aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2006-09-29 20:10:46 +0000
committerScott Ullrich <sullrich@pfsense.org>2006-09-29 20:10:46 +0000
commit0a176a018db0aee60d2fbbb4279ab377fc63f1a2 (patch)
tree7f1aa88418ac27220fcf35cf40f938767291f9b0 /packages
parent00ca3e6872c769a44741a3acc70d9319c9ff4d05 (diff)
downloadpfsense-packages-0a176a018db0aee60d2fbbb4279ab377fc63f1a2.tar.gz
pfsense-packages-0a176a018db0aee60d2fbbb4279ab377fc63f1a2.tar.bz2
pfsense-packages-0a176a018db0aee60d2fbbb4279ab377fc63f1a2.zip
When changing the on disk squid cache size, a squid -z is required.
Thanks to Free_The_Mallocs for the bug report.
Diffstat (limited to 'packages')
-rw-r--r--packages/squid.inc7
-rw-r--r--packages/squid_cache.xml9
2 files changed, 14 insertions, 2 deletions
diff --git a/packages/squid.inc b/packages/squid.inc
index 7879a874..d0acf191 100644
--- a/packages/squid.inc
+++ b/packages/squid.inc
@@ -1,7 +1,7 @@
<?php
/* $Id$ */
/*
- squid.sh
+ squid.inc
Copyright (C) 2006 Scott Ullrich
Copyright (C) 2006 Fernando Lemos
All rights reserved.
@@ -55,6 +55,11 @@ function squid_get_real_interface_address($iface) {
return array($ip, long2ip(hexdec($netmask)));
}
+/* setup cache */
+function squid_dash_z() {
+ mwexec("/usr/local/sbin/squid -z");
+}
+
function squid_chown_recursive($dir, $user, $group) {
chown($dir, $user);
chgrp($dir, $group);
diff --git a/packages/squid_cache.xml b/packages/squid_cache.xml
index 6e33d294..4e1a5f5d 100644
--- a/packages/squid_cache.xml
+++ b/packages/squid_cache.xml
@@ -2,7 +2,7 @@
<packagegui>
<include_file>squid.inc</include_file>
<name>squidcache</name>
- <title>Proxy server: Cache management</title>
+ <title>Proxy server: Cache management</title>
<tabs>
<tab>
<text>General settings</text>
@@ -125,10 +125,17 @@
<type>checkbox</type>
</field>
</fields>
+ <custom_php_command_before_form>
+ if($_POST['harddisk_cache_size'] != $config['installedpackages']['squidcache']['config'][0]['harddisk_cache_size']) {
+ $needs_dash_z = true;
+ }
+ </custom_php_command_before_form>
<custom_php_validation_command>
squid_validate_cache($_POST, &amp;$input_errors);
</custom_php_validation_command>
<custom_php_resync_config_command>
squid_resync();
+ if($needs_dash_z)
+ squid_dash_z();
</custom_php_resync_config_command>
</packagegui>