Florian Schaal
2015-05-04 0adcbbfd969731a9834ce4e018576b99fa2ecf56
changed if-else in installer to write configs for the latest version with force-install (package not yet installed)
1 files modified
24 ■■■■ changed files
install/lib/installer_base.lib.php 24 ●●●● patch | view | raw | blame | history
install/lib/installer_base.lib.php
@@ -885,12 +885,12 @@
        unset($parts);
        unset($out);
        if(version_compare($saslversion , '2.1.23') > 0) {
            //* Configfile for saslauthd versions 2.1.24 and newer
            $configfile = 'sasl_smtpd2.conf';
        } else {
        if(version_compare($saslversion , '2.1.23', '<=')) {
            //* Configfile for saslauthd versions up to 2.1.23
            $configfile = 'sasl_smtpd.conf';
        } else {
            //* Configfile for saslauthd versions 2.1.24 and newer
            $configfile = 'sasl_smtpd2.conf';
        }
        if(is_file($conf['postfix']['config_dir'].'/sasl/smtpd.conf')) copy($conf['postfix']['config_dir'].'/sasl/smtpd.conf', $conf['postfix']['config_dir'].'/sasl/smtpd.conf~');
@@ -1052,21 +1052,21 @@
        unset($tmp);
        //* Copy dovecot configuration file
        if(version_compare($dovecot_version,2) >= 0) {
        if(version_compare($dovecot_version,1, '<=')) {    //* Dovecot 1.x
            if(is_file($conf['ispconfig_install_dir'].'/server/conf-custom/install/debian_dovecot.conf.master')) {
                copy($conf['ispconfig_install_dir'].'/server/conf-custom/install/debian_dovecot.conf.master', $config_dir.'/'.$configfile);
            } else {
                copy('tpl/debian_dovecot.conf.master', $config_dir.'/'.$configfile);
            }
        } else {    //* Dovecot 2.x
            if(is_file($conf['ispconfig_install_dir'].'/server/conf-custom/install/debian_dovecot2.conf.master')) {
                copy($conf['ispconfig_install_dir'].'/server/conf-custom/install/debian_dovecot2.conf.master', $config_dir.'/'.$configfile);
            } else {
                copy('tpl/debian_dovecot2.conf.master', $config_dir.'/'.$configfile);
            }
            replaceLine($config_dir.'/'.$configfile, 'postmaster_address = postmaster@example.com', 'postmaster_address = postmaster@'.$conf['hostname'], 1, 0);
            if(version_compare($dovecot_version,2.1) < 0) {
            if(version_compare($dovecot_version, 2.1, '<')) {
                removeLine($config_dir.'/'.$configfile, 'ssl_protocols =');
            }
        } else {
            if(is_file($conf['ispconfig_install_dir'].'/server/conf-custom/install/debian_dovecot.conf.master')) {
                copy($conf['ispconfig_install_dir'].'/server/conf-custom/install/debian_dovecot.conf.master', $config_dir.'/'.$configfile);
            } else {
                copy('tpl/debian_dovecot.conf.master', $config_dir.'/'.$configfile);
            }
        }