python3-certbot-nginx is only available on Debian based systems.

see #437
This commit is contained in:
Antoine Nguyen
2022-10-05 18:17:54 +02:00
parent dbac16ee17
commit b84abbbacc

View File

@@ -92,13 +92,14 @@ class LetsEncryptCertificate(CertificateBackend):
else:
utils.printcolor("Failed to install certbot, aborting.", utils.RED)
sys.exit(1)
#Nginx plugin certbot
if (self.config.has_option("nginx", "enabled") and
self.config.getboolean("nginx", "enabled")):
package.backend.update()
# Nginx plugin certbot
if (
self.config.has_option("nginx", "enabled") and
self.config.getboolean("nginx", "enabled")
):
if name == "ubuntu" or name.startswith("debian"):
package.backend.install("python3-certbot-nginx")
def generate_cert(self):
"""Create a certificate."""
utils.printcolor(