Skip to content

Commit fd5edc4

Browse files
committed
don't rename postfix/dovecot local config override templates
1 parent b4ab929 commit fd5edc4

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

install/lib/update.lib.php

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,12 +473,22 @@ function checkAndRenameCustomTemplates($default_prompt='no') {
473473
'/usr/local/ispconfig/server/conf-custom/install',
474474
);
475475

476+
$override_templates = array(
477+
'postfix_custom.conf.master',
478+
'dovecot_custom.conf.master',
479+
);
480+
476481
$found_templates = array();
482+
$found_override_templates = array();
477483
foreach ($template_directories as $dir) {
478484
if (!is_dir($dir)) { continue; }
479485
foreach (glob("$dir/*.master") as $f) {
480486
if (is_file($f)) {
481-
$found_templates[] = $f;
487+
if (in_array( basename($f), $override_templates )) {
488+
$found_override_templates[] = $f;
489+
} else {
490+
$found_templates[] = $f;
491+
}
482492
}
483493
}
484494
}
@@ -501,6 +511,11 @@ function checkAndRenameCustomTemplates($default_prompt='no') {
501511
}
502512
}
503513

514+
if (count($found_override_templates) > 0) {
515+
echo "The following local config override templates were found, be sure to incorporate upstream changes if needed:\n\n";
516+
echo implode("\n", $found_override_templates) . "\n\n";
517+
}
518+
504519
return $ret;
505520
}
506521

0 commit comments

Comments
 (0)