centos9 fixes

This commit is contained in:
Spitap
2022-10-16 15:56:22 +02:00
parent b13cdbf0ba
commit d9ced63e99
6 changed files with 18 additions and 14 deletions

View File

@@ -59,7 +59,8 @@ class Dovecot(base.Installer):
context = super(Dovecot, self).get_template_context()
pw = pwd.getpwnam(self.user)
ssl_protocols = "!SSLv2 !SSLv3"
if package.backend.get_installed_version("openssl").startswith("1.1"):
if package.backend.get_installed_version("openssl").startswith("1.1") \
or package.backend.get_installed_version("openssl").startswith("3"):
ssl_protocols = "!SSLv3"
if "centos" in utils.dist_name():
protocols = "protocols = imap lmtp sieve"

View File

@@ -41,7 +41,7 @@ ssl_key = <%tls_key_file
#ssl_parameters_regenerate = 168
# SSL protocols to use
ssl_protocols = %ssl_protocols
ssl_min_protocol = %ssl_protocols
# SSL ciphers to use

View File

@@ -59,10 +59,6 @@ class Spamassassin(base.Installer):
"""Additional tasks."""
amavis_user = self.config.get("amavis", "user")
pw = pwd.getpwnam(amavis_user)
utils.exec_cmd(
"pyzor --homedir {} discover".format(pw[5]),
sudo_user=amavis_user, login=False
)
install("razor", self.config, self.upgrade)
if utils.dist_name() in ["debian", "ubuntu"]:
utils.exec_cmd(

View File

@@ -29,10 +29,7 @@ class Uwsgi(base.Installer):
def get_template_context(self, app):
"""Additionnal variables."""
context = super(Uwsgi, self).get_template_context()
if package.backend.FORMAT == "deb":
uwsgi_plugin = "python3"
else:
uwsgi_plugin = "python36"
uwsgi_plugin = "python3"
context.update({
"app_user": self.config.get(app, "user"),
"app_venv_path": self.config.get(app, "venv_path"),