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_view_config.php | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'config/postfix/postfix_view_config.php') diff --git a/config/postfix/postfix_view_config.php b/config/postfix/postfix_view_config.php index f82c9371..f50ae991 100644 --- a/config/postfix/postfix_view_config.php +++ b/config/postfix/postfix_view_config.php @@ -29,11 +29,15 @@ */ $shortcut_section = "postfix"; require("guiconfig.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'); +} function get_file($file){ $files['main']=POSTFIX_LOCALBASE."/etc/postfix/main.cf"; -- cgit v1.2.3