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

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