aboutsummaryrefslogtreecommitdiffstats
path: root/config/squid/squid.inc
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2011-12-28 09:21:57 -0500
committerjim-p <jimp@pfsense.org>2011-12-28 09:21:57 -0500
commit54cc1ac21a9e89a496800bb521ca7d485929cc95 (patch)
treeada5f2ccad8a7e5cf150e918746e37e783802cf3 /config/squid/squid.inc
parentfe991e5789aa214bd7165b605d26bd1937c107cc (diff)
downloadpfsense-packages-54cc1ac21a9e89a496800bb521ca7d485929cc95.tar.gz
pfsense-packages-54cc1ac21a9e89a496800bb521ca7d485929cc95.tar.bz2
pfsense-packages-54cc1ac21a9e89a496800bb521ca7d485929cc95.zip
When adding squid's rotate job, make it rm the swap.state file before rotating to be extra sure it's written cleanly.
Diffstat (limited to 'config/squid/squid.inc')
-rw-r--r--config/squid/squid.inc3
1 files changed, 2 insertions, 1 deletions
diff --git a/config/squid/squid.inc b/config/squid/squid.inc
index 3848b818..5ad2eb4c 100644
--- a/config/squid/squid.inc
+++ b/config/squid/squid.inc
@@ -548,6 +548,7 @@ function squid_install_cron($should_install) {
switch($should_install) {
case true:
if(!$is_installed) {
+ $cachedir =($settings['harddisk_cache_location'] ? $settings['harddisk_cache_location'] : '/var/squid/cache');
$cron_item = array();
$cron_item['task_name'] = "squid_rotate_logs";
$cron_item['minute'] = "0";
@@ -556,7 +557,7 @@ function squid_install_cron($should_install) {
$cron_item['month'] = "*";
$cron_item['wday'] = "*";
$cron_item['who'] = "root";
- $cron_item['command'] = "/usr/local/sbin/squid -k rotate";
+ $cron_item['command'] = "/bin/rm {$cachedir}/swap.state; /usr/local/sbin/squid -k rotate";
$config['cron']['item'][] = $cron_item;
parse_config(true);
write_config("Squid Log Rotation");