https: remove dhparams.pem before running gencerts

On EL9 the file exists and script errors with wrong
permissions to it.

Closes-Bug: #2011716
Change-Id: Ib32baa3208e6bfc5520ff8537193c9a4d6cbada7
(cherry picked from commit 12d431e399)
This commit is contained in:
Michal Nasiadka 2023-03-06 18:27:46 +01:00 committed by Maksim Malchuk
parent 6d1efb092c
commit 003fff5dc1
1 changed files with 2 additions and 0 deletions

View File

@ -24,7 +24,9 @@ if [[ "$(whoami)" == 'root' ]]; then
# on startup:
# SSLCertificateFile: file '/etc/pki/tls/certs/localhost.crt' does not exist or is empty
# Work around this by generating certificates manually.
# NOTE(mnasiadka): in EL9 upgrade jobs gencerts is failing on wrong permissions to dhparams.pem
if [[ "${KOLLA_BASE_DISTRO}" =~ centos|rocky ]] && [[ ! -e /etc/pki/tls/certs/localhost.crt ]]; then
rm -f /tmp/dhparams.pem
/usr/libexec/httpd-ssl-gencerts
fi
fi