Skip to content

Commit eed63b3

Browse files
author
Thom Pol
committed
Add check if conf.d folder for Dovecot exists
1 parent 581bb48 commit eed63b3

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

install/dist/lib/debian60.lib.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,9 @@ public function configure_dovecot()
110110
}
111111
// Copy custom config file
112112
if(is_file($conf['ispconfig_install_dir'].'/server/conf-custom/install/dovecot_custom.conf.master')) {
113+
if(!@is_dir($config_dir . '/conf.d')) {
114+
mkdir($config_dir . '/conf.d');
115+
}
113116
copy($conf['ispconfig_install_dir'].'/server/conf-custom/install/dovecot_custom.conf.master', $config_dir.'/conf.d/99-ispconfig-custom-config.conf');
114117
}
115118
replaceLine($config_dir.'/'.$configfile, 'postmaster_address = postmaster@example.com', 'postmaster_address = postmaster@'.$conf['hostname'], 1, 0);

install/lib/installer_base.lib.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1536,6 +1536,9 @@ public function configure_dovecot() {
15361536
}
15371537
// Copy custom config file
15381538
if(is_file($conf['ispconfig_install_dir'].'/server/conf-custom/install/dovecot_custom.conf.master')) {
1539+
if(!@is_dir($config_dir . '/conf.d')) {
1540+
mkdir($config_dir . '/conf.d');
1541+
}
15391542
copy($conf['ispconfig_install_dir'].'/server/conf-custom/install/dovecot_custom.conf.master', $config_dir.'/conf.d/99-ispconfig-custom-config.conf');
15401543
}
15411544
replaceLine($config_dir.'/'.$configfile, 'postmaster_address = postmaster@example.com', 'postmaster_address = postmaster@'.$conf['hostname'], 1, 0);

0 commit comments

Comments
 (0)