aboutsummaryrefslogtreecommitdiffstats
path: root/config/squid3
diff options
context:
space:
mode:
authordoktornotor <notordoktor@gmail.com>2015-10-10 11:40:59 +0200
committerdoktornotor <notordoktor@gmail.com>2015-10-10 11:40:59 +0200
commitf15eb1c05d8c5f3bd0c3040ea9dc65d778f8f670 (patch)
treee28f0ca9de56c1018b8ae56daea141aedf8b3782 /config/squid3
parentfd1760bc33514c9d40fe18d5257ac01ae2c86e76 (diff)
downloadpfsense-packages-f15eb1c05d8c5f3bd0c3040ea9dc65d778f8f670.tar.gz
pfsense-packages-f15eb1c05d8c5f3bd0c3040ea9dc65d778f8f670.tar.bz2
pfsense-packages-f15eb1c05d8c5f3bd0c3040ea9dc65d778f8f670.zip
Adjust script for removal of 'Clear Cache on Log Rotate' misfeature
Diffstat (limited to 'config/squid3')
-rw-r--r--config/squid3/34/swapstate_check.php10
1 files changed, 3 insertions, 7 deletions
diff --git a/config/squid3/34/swapstate_check.php b/config/squid3/34/swapstate_check.php
index b144f6d8..22c45f11 100644
--- a/config/squid3/34/swapstate_check.php
+++ b/config/squid3/34/swapstate_check.php
@@ -44,8 +44,7 @@ if (isset($settings['harddisk_cache_system']) && $settings['harddisk_cache_syste
return;
}
if (substr($cachedir, 0, 11) !== "/var/squid/") {
- log_error("swapstate_check.php will NOT manage Squid cache dir '{$cachedir}' since it is not located under /var/squid.");
- log_error("Disable 'Clear Cache on Log Rotate' on the 'Local Cache' tab or relocate your cache dir under /var/squid.");
+ log_error("[squid] swapstate_check.php will NOT manage Squid cache dir '{$cachedir}' since it is not located under /var/squid.");
return;
}
@@ -67,15 +66,12 @@ if (isset($settings['harddisk_cache_system']) && $settings['harddisk_cache_syste
if ($swapstate_size > 1024*1024*1024) {
$rotate_reason .= "$cachedir/swap.state is larger than 1GB. ";
}
- if ($settings['clear_cache'] == 'on') {
- $rotate_reason .= "'Clear Cache on Log Rotate' is enabled in 'Local Cache' settings. ";
- }
if ($argv[1] == "clean") {
- $rotate_reason .= "Clear cache forced by cronjob. ";
+ $rotate_reason .= "Clear cache forced by running swapstate_check.php manually with {$argv[1]} argument. ";
}
if (($swapstate_pct > 75) || (($diskusedpct > 90) && ($swapstate_size > 1024*1024*1024)) || $argv[1] == "clean") {
squid_dash_z('clean');
- log_error(gettext(sprintf("$rotate_reason Removing and rotating. File was %d bytes, %d%% of total disk space.", $swapstate_size, $swapstate_pct)));
+ log_error(gettext(sprintf("[squid] $rotate_reason Removing and rotating. File was %d bytes, %d%% of total disk space.", $swapstate_size, $swapstate_pct)));
}
}
?>