diff options
-rw-r--r-- | packages/squid/squid.inc | 14 | ||||
-rw-r--r-- | packages/squid3/squid.inc | 10 |
2 files changed, 17 insertions, 7 deletions
diff --git a/packages/squid/squid.inc b/packages/squid/squid.inc index 444a4406..5bfe57fb 100644 --- a/packages/squid/squid.inc +++ b/packages/squid/squid.inc @@ -4,7 +4,6 @@ squid.inc Copyright (C) 2006 Scott Ullrich Copyright (C) 2006 Fernando Lemos - Copyright (C) 2008 Martin Fuchs All rights reserved. Redistribution and use in source and binary forms, with or without @@ -529,7 +528,7 @@ function squid_resync_general() { $language = ($settings['error_language'] ? $settings['error_language'] : 'English'); $errordir = SQUID_CONFBASE . '/errors/' . $language; $icondir = SQUID_CONFBASE . '/icons'; - $hostname = ($settings['visible_hostname'] ? $settings['visible_hostname'] : 'localhost'); + $hostname = ($settings['visible_hostname'] ? $settings['visible_hostname'] : 'localhost'); $email = ($settings['admin_email'] ? $settings['admin_email'] : 'admin@localhost'); $logdir = ($settings['log_dir'] ? $settings['log_dir'] : '/var/squid/log'); @@ -619,7 +618,10 @@ EOD; $conf .= 'acl donotcache dstdomain "' . SQUID_ACLDIR . "/donotcache.acl\"\n"; $conf .= 'cache deny donotcache'; } - + elseif (file_exists(SQUID_ACLDIR . '/donotcache.acl')) { + unlink(SQUID_ACLDIR . '/donotcache.acl'); + } + return $conf; } @@ -655,7 +657,7 @@ function squid_resync_redirector() { function squid_resync_nac() { global $config, $valid_acls; - $port = ($settings['proxy_port'] ? $settings['proxy_port'] : 3128); + $port = ($settings['proxy_port'] ? $settings['proxy_port'] : 3128); $settings = $config['installedpackages']['squidnac']['config'][0]; $webgui_port = $config['system']['webgui']['port']; @@ -698,10 +700,12 @@ EOD; $conf .= "acl $option $directive \"" . SQUID_ACLDIR . "/$option.acl\"\n"; $valid_acls[] = $option; } + elseif (file_exists(SQUID_ACLDIR . "/$option.acl")) { + unlink(SQUID_ACLDIR . "/$option.acl"); + } } $conf .= <<<EOD - cache deny dynamic http_access allow manager localhost diff --git a/packages/squid3/squid.inc b/packages/squid3/squid.inc index 5298f7ad..7c816ce2 100644 --- a/packages/squid3/squid.inc +++ b/packages/squid3/squid.inc @@ -619,7 +619,10 @@ EOD; $conf .= 'acl donotcache dstdomain "' . SQUID_ACLDIR . "/donotcache.acl\"\n"; $conf .= 'cache deny donotcache'; } - + elseif (file_exists(SQUID_ACLDIR . '/donotcache.acl')) { + unlink(SQUID_ACLDIR . '/donotcache.acl'); + } + return $conf; } @@ -655,7 +658,7 @@ function squid_resync_redirector() { function squid_resync_nac() { global $config, $valid_acls; - $port = ($settings['proxy_port'] ? $settings['proxy_port'] : 3128); + $port = ($settings['proxy_port'] ? $settings['proxy_port'] : 3128); $settings = $config['installedpackages']['squidnac']['config'][0]; $webgui_port = $config['system']['webgui']['port']; @@ -697,6 +700,9 @@ EOD; $conf .= "acl $option $directive \"" . SQUID_ACLDIR . "/$option.acl\"\n"; $valid_acls[] = $option; } + elseif (file_exists(SQUID_ACLDIR . "/$option.acl")) { + unlink(SQUID_ACLDIR . "/$option.acl"); + } } $conf .= <<<EOD |