From 4a39025643c95046db57fa391572573cc8871c2a Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Wed, 29 Apr 2015 16:12:00 -0300 Subject: Sanitize squidguard version, add port_category, run_depends and fix pbi checking --- config/squidGuard/squidguard_configurator.inc | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'config') diff --git a/config/squidGuard/squidguard_configurator.inc b/config/squidGuard/squidguard_configurator.inc index 551ca542..99907451 100644 --- a/config/squidGuard/squidguard_configurator.inc +++ b/config/squidGuard/squidguard_configurator.inc @@ -121,7 +121,7 @@ define('REDIRECT_URL_ARGS', '&a=%a&n=%n&i=%i&s=%s&t=%t&u=%u'); # ------------------------------------------------------------------------------ -if ($pf_version > 2.0) { +if ($pf_version == "2.0" || $pf_version == "2.2") { if (file_exists('/usr/pbi/squidguard-squid3-' . php_uname("m"))) define('SQUIDGUARD_LOCALBASE', '/usr/pbi/squidguard-squid3-' . php_uname("m")); else @@ -129,10 +129,12 @@ if ($pf_version > 2.0) { } else define('SQUIDGUARD_LOCALBASE','/usr/local'); -if (!defined('SQUID_LOCALBASE') && ($pf_version > 2.0)) - define('SQUID_LOCALBASE', '/usr/pbi/squid-' . php_uname("m")); -elseif (!defined('SQUID_LOCALBASE')) - define('SQUID_LOCALBASE','/usr/local'); +if (!defined('SQUID_LOCALBASE')) { + if ($pf_version == "2.0" || $pf_version == "2.2") + define('SQUID_LOCALBASE', '/usr/pbi/squid-' . php_uname("m")); + else + define('SQUID_LOCALBASE','/usr/local'); +} define('SQUID_CONFIGFILE', SQUID_LOCALBASE . '/etc/squid/squid.conf'); define('TMP_DIR', '/var/tmp'); -- cgit v1.2.3