diff options
author | jim-p <jimp@pfsense.org> | 2013-05-29 14:49:29 -0400 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2013-05-29 14:49:29 -0400 |
commit | 43a31499160ff9daaeb740f6a7cf980906d16d39 (patch) | |
tree | 3c3d83d43dbefcc788c6e3ca477a443579db9cc5 /config | |
parent | 2261c33164a091e4031debde90d8f416b6da87f7 (diff) | |
download | pfsense-packages-43a31499160ff9daaeb740f6a7cf980906d16d39.tar.gz pfsense-packages-43a31499160ff9daaeb740f6a7cf980906d16d39.tar.bz2 pfsense-packages-43a31499160ff9daaeb740f6a7cf980906d16d39.zip |
Detect and use the squidGuard variant if it's found.
Diffstat (limited to 'config')
-rw-r--r-- | config/squidGuard/squidguard_configurator.inc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/config/squidGuard/squidguard_configurator.inc b/config/squidGuard/squidguard_configurator.inc index e57b7597..b900a477 100644 --- a/config/squidGuard/squidguard_configurator.inc +++ b/config/squidGuard/squidguard_configurator.inc @@ -112,9 +112,12 @@ define('REDIRECT_URL_ARGS', '&a=%a&n=%n&i=%i&s=%s&t=%t&u=%u'); # ------------------------------------------------------------------------------ $pf_version=substr(trim(file_get_contents("/etc/version")),0,3); -if ($pf_version > 2.0) - define('SQUIDGUARD_LOCALBASE', '/usr/pbi/squidguard-' . php_uname("m")); -else +if ($pf_version > 2.0) { + if (file_exists('/usr/pbi/squidguard-squid3-' . php_uname("m"))) + define('SQUIDGUARD_LOCALBASE', '/usr/pbi/squidguard-squid3-' . php_uname("m")); + else + define('SQUIDGUARD_LOCALBASE', '/usr/pbi/squidguard-' . php_uname("m")); +} else define('SQUIDGUARD_LOCALBASE','/usr/local'); if (!defined('SQUID_LOCALBASE') && ($pf_version > 2.0)) |