diff options
author | Marcello Coutinho <marcellocoutinho@gmail.com> | 2012-05-08 15:52:43 -0300 |
---|---|---|
committer | marcelloc <marcellocoutinho@gmail.com> | 2012-05-08 15:52:43 -0300 |
commit | c8234d0da2cab0931124694f285a7a7a0e056e0e (patch) | |
tree | e8b33445d6b5ce7a49da91548418489b6e17579a /config | |
parent | 97ca4a44ae840344dd9cae135ac3835dbfed6ec9 (diff) | |
download | pfsense-packages-c8234d0da2cab0931124694f285a7a7a0e056e0e.tar.gz pfsense-packages-c8234d0da2cab0931124694f285a7a7a0e056e0e.tar.bz2 pfsense-packages-c8234d0da2cab0931124694f285a7a7a0e056e0e.zip |
squid3 - fix to cachemgr_options code generation
Diffstat (limited to 'config')
-rw-r--r-- | config/squid-reverse/squid.inc | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/config/squid-reverse/squid.inc b/config/squid-reverse/squid.inc index 66f7e51c..99b3cfc5 100644 --- a/config/squid-reverse/squid.inc +++ b/config/squid-reverse/squid.inc @@ -1042,18 +1042,18 @@ EOD; http_access allow manager localhost EOD; - if(!empty($settings['ext_cachemanager'])) { - $extmgr = explode(";", ($settings['ext_cachemanager'])); - $count = 1; - $conf .= "\n# Allow external cache managers\n"; -// $conf .= "acl ext_manager src ".$settings['ext_cachemanager']."\n"; - foreach ($extmgr as $mgr) { - $conf .= "acl ext_manager_".$count." src "; - $conf .= $mgr." "; - $conf .= "\n"; - $conf .= "http_access allow manager ext_manager_".$count."\n"; - $count += 1; - }} + + if (is_array($config['installedpackages']['squidcache'])){ + $settings_ch = $config['installedpackages']['squidcache']['config'][0]; + if(!empty($settings_ch['ext_cachemanager'])) { + $extmgr = explode(";", ($settings_ch['ext_cachemanager'])); + $conf .= "\n# Allow external cache managers\n"; + foreach ($extmgr as $mgr) { + $conf .= "acl ext_manager src {$mgr}\n"; + } + $conf .= "http_access allow manager ext_manager\n"; + } + } $conf .= <<<EOD |