From 5e162fc16051a55393ef1d5e45963c07e1438f50 Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Tue, 5 May 2015 08:35:32 -0300 Subject: Add support for 2.3+ pbi detection and remove duplicated definition of SQUID_BASE --- config/squid3/34/squid.inc | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'config/squid3') diff --git a/config/squid3/34/squid.inc b/config/squid3/34/squid.inc index cce9bddd..4876b472 100755 --- a/config/squid3/34/squid.inc +++ b/config/squid3/34/squid.inc @@ -42,12 +42,18 @@ if(!function_exists("filter_configure")) require_once("filter.inc"); $shortcut_section = "squid"; -define('SQUID_BASE', '/usr/pbi/squid-' . php_uname("m")); -define('SQUID_LOCALBASE', SQUID_BASE . "/local"); + +$pfs_version=substr(trim(file_get_contents("/etc/version")),0,3); +if ($pfs_version == "2.1" || $pfs_version == "2.2") { + define('SQUID_BASE', '/usr/pbi/squid-' . php_uname("m")); + define('SQUID_LOCALBASE', SQUID_BASE . "/local"); +} else { + define('SQUID_BASE', '/usr/local'); + define('SQUID_LOCALBASE', '/usr/local'); +} define('SQUID_CONFBASE', SQUID_LOCALBASE .'/etc/squid'); define('SQUID_CONFFILE', SQUID_CONFBASE . '/squid.conf'); -define('SQUID_BASE', '/var/squid/'); define('SQUID_ACLDIR', '/var/squid/acl'); define('SQUID_PASSWD', '/var/etc/squid.passwd'); define('SQUID_LIB','/var/squid/lib'); -- cgit v1.2.3