mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-28 08:03:36 +00:00
letsencrypt: Use new setup mechanism
This commit is contained in:
parent
cceddf5c0a
commit
cef8f5c2c4
@ -24,10 +24,34 @@ from django.utils.translation import ugettext_lazy as _
|
||||
from plinth import action_utils
|
||||
from plinth import cfg
|
||||
from plinth.modules import names
|
||||
from plinth.utils import format_lazy
|
||||
|
||||
|
||||
version = 1
|
||||
|
||||
is_essential = True
|
||||
|
||||
depends = ['apps', 'names']
|
||||
|
||||
title = _('Certificates (Let\'s Encrypt)')
|
||||
|
||||
description = [
|
||||
format_lazy(
|
||||
_('A digital certficate allows users of a web service to verify the '
|
||||
'identity of the service and to securely communicate with it. '
|
||||
'{box_name} can automatically obtain and setup digital '
|
||||
'certificates for each available domain. It does so by proving '
|
||||
'itself to be the owner of a domain to Let\'s Encrypt, a '
|
||||
'certficate authority (CA).'), box_name=_(cfg.box_name)),
|
||||
|
||||
_('Let\'s Encrypt is a free, automated, and open certificate '
|
||||
'authority, run for the public’s benefit by the Internet Security '
|
||||
'Research Group (ISRG). Please read and agree with the '
|
||||
'<a href="https://letsencrypt.org/repository/">Let\'s Encrypt '
|
||||
'Subscriber Agreement</a> before using this service.')
|
||||
]
|
||||
|
||||
|
||||
service = None
|
||||
|
||||
|
||||
@ -38,6 +62,11 @@ def init():
|
||||
'glyphicon-lock', 'letsencrypt:index', 20)
|
||||
|
||||
|
||||
def setup(helper, old_version=None):
|
||||
"""Install and configure the module."""
|
||||
helper.install(['letsencrypt'])
|
||||
|
||||
|
||||
def diagnose():
|
||||
"""Run diagnostics and return the results."""
|
||||
results = []
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
{% extends "base.html" %}
|
||||
{% extends "app.html" %}
|
||||
{% comment %}
|
||||
#
|
||||
# This file is part of Plinth.
|
||||
@ -33,30 +33,7 @@
|
||||
</style>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<h2>{% trans "Certificates (Let's Encrypt)" %}</h2>
|
||||
|
||||
<p>
|
||||
{% blocktrans trimmed %}
|
||||
A digital certficate allows users of a web service to verify the
|
||||
identity of the service and to securely communicate with it.
|
||||
{{ box_name }} can automatically obtain and setup digital
|
||||
certificates for each available domain. It does so by proving
|
||||
itself to be the owner of a domain to Let's Encrypt, a
|
||||
certficate authority (CA).
|
||||
{% endblocktrans %}
|
||||
</p>
|
||||
|
||||
<p>
|
||||
{% blocktrans trimmed %}
|
||||
Let's Encrypt is a free, automated, and open certificate
|
||||
authority, run for the public’s benefit by the Internet Security
|
||||
Research Group (ISRG). Please read and agree with the
|
||||
<a href="https://letsencrypt.org/repository/">Let's Encrypt
|
||||
Subscriber Agreement</a> before using this service.
|
||||
{% endblocktrans %}
|
||||
</p>
|
||||
{% block configuration %}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-8">
|
||||
|
||||
@ -29,20 +29,20 @@ import json
|
||||
import logging
|
||||
|
||||
from plinth import actions
|
||||
from plinth import package
|
||||
from plinth.errors import ActionError
|
||||
from plinth.modules import letsencrypt
|
||||
from plinth.modules import names
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@package.required(['letsencrypt'])
|
||||
def index(request):
|
||||
"""Serve configuration page."""
|
||||
status = get_status()
|
||||
|
||||
return TemplateResponse(request, 'letsencrypt.html',
|
||||
{'title': _('Certificates (Let\'s Encrypt)'),
|
||||
{'title': letsencrypt.title,
|
||||
'description': letsencrypt.description,
|
||||
'status': status})
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user