From c47a99b25e8c48c2580ec64eca71b41c7c2f5965 Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Thu, 20 Jun 2019 19:31:56 -0700 Subject: [PATCH] apache: Add let's encrypt certificate component Signed-off-by: Sunil Mohan Adapa Reviewed-by: Joseph Nuthalapati --- plinth/modules/apache/__init__.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/plinth/modules/apache/__init__.py b/plinth/modules/apache/__init__.py index 19f646153..9d619c3f7 100644 --- a/plinth/modules/apache/__init__.py +++ b/plinth/modules/apache/__init__.py @@ -23,13 +23,17 @@ from django.utils.translation import ugettext_lazy as _ from plinth import actions from plinth import app as app_module from plinth import cfg +from plinth.daemon import Daemon from plinth.modules.firewall.components import Firewall +from plinth.modules.letsencrypt.components import LetsEncrypt from plinth.utils import format_lazy version = 7 is_essential = True +managed_services = ['apache2'] + managed_packages = ['apache2', 'php-fpm'] app = None @@ -55,6 +59,13 @@ class ApacheApp(app_module.App): cfg.box_name)), ports=['http', 'https'], is_external=True) self.add(freedombox_ports) + letsencrypt = LetsEncrypt('letsencrypt-apache', domains='*', + daemons=[managed_services[0]]) + self.add(letsencrypt) + + daemon = Daemon('daemon-apache', managed_services[0]) + self.add(daemon) + def init(): """Initailze firewall module"""