Skip to content

Commit 5d45b76

Browse files
author
Florian Schaal
committed
fixed installer - ispconfig/ispconfig3#3750
1 parent eca13b9 commit 5d45b76

File tree

5 files changed

+11
-6
lines changed

5 files changed

+11
-6
lines changed

install/dist/lib/debian60.lib.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,9 @@ public function configure_dovecot()
5353
$config_dir = $conf['postfix']['config_dir'];
5454
//* Configure master.cf and add a line for deliver
5555
if ($this->postfix_master()) {
56-
exec ("postconf -M dovecot.unix &> /dev/null", $out, $ret);
57-
$add_dovecot_service = @($out[0]=='')?true:false;
56+
exec ("postconf -M dovecot.unix", $out, $ret); //* Postfix 2.9
57+
if (!isset($out[0])) exec ("postconf -M dovecot/unix", $out, $ret); //* Postfix >= 2.11
58+
$add_dovecot_service = @($out[0]=='')?true:false;
5859
} else { //* fallback - postfix < 2.9
5960
$content = rf($config_dir.'/master.cf');
6061
$add_dovecot_service = @(!stristr($content, "dovecot/deliver"))?true:false;

install/dist/lib/fedora.lib.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,8 @@ public function configure_dovecot()
352352
$config_dir = $conf['postfix']['config_dir'];
353353
//* Configure master.cf and add a line for deliver
354354
if ($this->postfix_master()) {
355-
exec ("postconf -M dovecot.unix &> /dev/null", $out, $ret);
355+
exec ("postconf -M dovecot.unix", $out, $ret); //* Postfix 2.9
356+
if (!isset($out[0])) exec ("postconf -M dovecot/unix", $out, $ret); //* Postfix >= 2.11
356357
$add_dovecot_service = @($out[0]=='')?true:false;
357358
} else { //* fallback - postfix < 2.9
358359
$content = rf($config_dir.'/master.cf');

install/dist/lib/gentoo.lib.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,8 @@ public function configure_dovecot()
273273
$config_dir = $conf['postfix']['config_dir'];
274274
//* Configure master.cf and add a line for deliver
275275
if ($this->postfix_master()) {
276-
exec ("postconf -M dovecot.unix &> /dev/null", $out, $ret);
276+
exec ("postconf -M dovecot.unix", $out, $ret); //* Postfix 2.9
277+
if (!isset($out[0])) exec ("postconf -M dovecot/unix", $out, $ret); //* Postfix >= 2.11
277278
$add_dovecot_service = @($out[0]=='')?true:false;
278279
} else { //* fallback - postfix < 2.9
279280
$content = rf($config_dir.'/master.cf');

install/dist/lib/opensuse.lib.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,8 @@ public function configure_dovecot()
367367
$config_dir = $conf['postfix']['config_dir'];
368368
//* Configure master.cf and add a line for deliver
369369
if ($this->postfix_master()) {
370-
exec ("postconf -M dovecot.unix &> /dev/null", $out, $ret);
370+
exec ("postconf -M dovecot.unix", $out, $ret); //* Postfix 2.9
371+
if (!isset($out[0])) exec ("postconf -M dovecot/unix", $out, $ret); //* Postfix >= 2.11
371372
$add_dovecot_service = @($out[0]=='')?true:false;
372373
} else { //* fallback - postfix < 2.9
373374
$content = rf($config_dir.'/master.cf');

install/lib/installer_base.lib.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1145,7 +1145,8 @@ public function configure_dovecot() {
11451145
$config_dir = $conf['postfix']['config_dir'];
11461146
//* Configure master.cf and add a line for deliver
11471147
if ($this->postfix_master()) {
1148-
exec ("postconf -M dovecot.unix &> /dev/null", $out, $ret);
1148+
exec ("postconf -M dovecot.unix", $out, $ret); //* Postfix 2.9
1149+
if (!isset($out[0])) exec ("postconf -M dovecot/unix", $out, $ret); //* Postfix >= 2.11
11491150
$add_dovecot_service = @($out[0]=='')?true:false;
11501151
} else { //* fallback - postfix < 2.9
11511152
$content = rf($config_dir.'/master.cf');

0 commit comments

Comments
 (0)