diff options
author | Renato Botelho <renato@netgate.com> | 2015-10-10 10:04:37 -0300 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2015-10-10 10:04:37 -0300 |
commit | 675b121ee2de4c1c430219053a9ba5f0d6a7e568 (patch) | |
tree | e96b7aedee3d802dfbd6e6a7bc96d14e54a473b6 /config/squid3/34/swapstate_check.php | |
parent | 3bd5c2bd64800857ebd86b98668d9d499735c536 (diff) | |
parent | d2d55881b7bd9ed59baae9d7323f6e135f138a0e (diff) | |
download | pfsense-packages-675b121ee2de4c1c430219053a9ba5f0d6a7e568.tar.gz pfsense-packages-675b121ee2de4c1c430219053a9ba5f0d6a7e568.tar.bz2 pfsense-packages-675b121ee2de4c1c430219053a9ba5f0d6a7e568.zip |
Merge pull request #1092 from doktornotor/patch-2
Diffstat (limited to 'config/squid3/34/swapstate_check.php')
-rw-r--r-- | config/squid3/34/swapstate_check.php | 10 |
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))); } } ?> |