From e32299eb10722d6b5d232335903061c060b086ed Mon Sep 17 00:00:00 2001 From: Marcello Coutinho Date: Tue, 18 Nov 2014 17:57:06 -0200 Subject: Postfix - Improve package instalation folder checks --- config/postfix/postfix.inc | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'config/postfix/postfix.inc') diff --git a/config/postfix/postfix.inc b/config/postfix/postfix.inc index 8f27680d..99af671b 100755 --- a/config/postfix/postfix.inc +++ b/config/postfix/postfix.inc @@ -35,12 +35,15 @@ require_once("functions.inc"); require_once("pkg-utils.inc"); require_once("globals.inc"); -$pf_version=substr(trim(file_get_contents("/etc/version")),0,3); -if ($pf_version > 2.0) - define('POSTFIX_LOCALBASE', '/usr/pbi/postfix-' . php_uname("m")); -else - define('POSTFIX_LOCALBASE','/usr/local'); - +$pfs_version = substr(trim(file_get_contents("/etc/version")),0,3); +if (is_dir('/usr/pbi/postfix-' . php_uname("m"))) { + if ($pfs_version == 2.2) + define('POSTFIX_LOCALBASE', '/usr/pbi/postfix-' . php_uname("m")."/local"); + else + define('POSTFIX_LOCALBASE', '/usr/pbi/postfix-' . php_uname("m")); +} else { + define('POSTFIX_LOCALBASE','/usr/local'); +} $uname=posix_uname(); if ($uname['machine']=='amd64') -- cgit v1.2.3