diff options
Diffstat (limited to 'config/squid')
-rw-r--r-- | config/squid/squid.inc | 12 | ||||
-rw-r--r-- | config/squid/squid_ng.inc | 4 |
2 files changed, 9 insertions, 7 deletions
diff --git a/config/squid/squid.inc b/config/squid/squid.inc index 960bad67..bd0c8634 100644 --- a/config/squid/squid.inc +++ b/config/squid/squid.inc @@ -219,10 +219,6 @@ function squid_install_command() { exec("chmod a+rx " . SQUID_LOCALBASE . "/libexec/squid/dnsserver"); if(file_exists("/usr/local/pkg/swapstate_check.php")) exec("/bin/chmod a+x /usr/local/pkg/swapstate_check.php"); - write_rcfile(array( - "file" => "sqp_monitor.sh", - "start" => "/usr/local/pkg/sqpmon.sh &", - "stop" => "ps awux | grep \"sqpmon\" | grep -v \"grep\" | grep -v \"php\" | awk '{ print $2 }' | xargs kill")); foreach (array( SQUID_CONFBASE, SQUID_ACLDIR, @@ -862,11 +858,13 @@ http_access allow manager localhost EOD; if(!empty($settings['ext_cachemanager'])) { - $extmgr = explode(";", ($settings['ext_cachemanager'])); + $extmgr = array_unique(explode(";", rtrim($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) { + if (empty($mgr)) + continue; $conf .= "acl ext_manager_".$count." src "; $conf .= $mgr." "; $conf .= "\n"; @@ -1477,6 +1475,10 @@ if [ -z "`ps auxw | grep "[s]quid -D"|awk '{print $2}'`" ];then EOD; conf_mount_rw(); write_rcfile($rc); + write_rcfile(array( + "file" => "sqp_monitor.sh", + "start" => "/usr/local/pkg/sqpmon.sh &", + "stop" => "ps awux | grep \"sqpmon\" | grep -v \"grep\" | grep -v \"php\" | awk '{ print $2 }' | xargs kill")); conf_mount_ro(); } ?> diff --git a/config/squid/squid_ng.inc b/config/squid/squid_ng.inc index 03f6d48c..cfd2fe66 100644 --- a/config/squid/squid_ng.inc +++ b/config/squid/squid_ng.inc @@ -47,7 +47,7 @@ function global_write_squid_config() $active_interface = $config['installedpackages']['squid']['config'][0]['active_interface']; $transparent_proxy = $config['installedpackages']['squid']['config'][0]['transparent_proxy']; $log_enabled = $config['installedpackages']['squid']['config'][0]['log_enabled']; - $urlfier_enable = $config['installedpackages']['squid']['config'][0]['urlfilter_enable']; + $urlfilter_enable = $config['installedpackages']['squid']['config'][0]['urlfilter_enable']; $accesslog_disabled = $config['installedpackages']['squid']['config'][0]['accesslog_disabled']; $log_query_terms = $config['installedpackages']['squid']['config'][0]['log_query_terms']; $log_user_agents = $config['installedpackages']['squid']['config'][0]['log_user_agents']; @@ -560,7 +560,7 @@ function global_write_squid_config() $config_array[] = 'acl pf_banned_ip src "/usr/local/etc/squid/advanced/acls/src_banned_ip.acl"' . "\n"; } - unset($banned_ip_addr); + unset($banned_ip_array); unset($banned_ip_addr); unset($ind_banned_ip); |