From fd5edc4f675e073090f70dd4ca2d46f816a1ee19 Mon Sep 17 00:00:00 2001 From: Jesse Norell Date: Tue, 9 Mar 2021 17:04:40 -0700 Subject: [PATCH] don't rename postfix/dovecot local config override templates --- install/lib/update.lib.php | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/install/lib/update.lib.php b/install/lib/update.lib.php index 33b89786a6..d88d64d6cd 100644 --- a/install/lib/update.lib.php +++ b/install/lib/update.lib.php @@ -473,12 +473,22 @@ function checkAndRenameCustomTemplates($default_prompt='no') { '/usr/local/ispconfig/server/conf-custom/install', ); + $override_templates = array( + 'postfix_custom.conf.master', + 'dovecot_custom.conf.master', + ); + $found_templates = array(); + $found_override_templates = array(); foreach ($template_directories as $dir) { if (!is_dir($dir)) { continue; } foreach (glob("$dir/*.master") as $f) { if (is_file($f)) { - $found_templates[] = $f; + if (in_array( basename($f), $override_templates )) { + $found_override_templates[] = $f; + } else { + $found_templates[] = $f; + } } } } @@ -501,6 +511,11 @@ function checkAndRenameCustomTemplates($default_prompt='no') { } } + if (count($found_override_templates) > 0) { + echo "The following local config override templates were found, be sure to incorporate upstream changes if needed:\n\n"; + echo implode("\n", $found_override_templates) . "\n\n"; + } + return $ret; } -- GitLab