mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-03-11 09:04:54 +00:00
monkeysphere: Use new setup mechanism
This commit is contained in:
parent
cef8f5c2c4
commit
608d19dc2b
@ -23,11 +23,31 @@ from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from plinth import cfg
|
||||
|
||||
version = 1
|
||||
|
||||
depends = ['system']
|
||||
|
||||
title = _('Monkeysphere')
|
||||
|
||||
description = [
|
||||
_('With Monkeysphere, a PGP key can be generated for each configured '
|
||||
'domain serving SSH. The PGP public key can then be uploaded to the PGP '
|
||||
'keyservers. Users connecting to this machine through SSH can verify '
|
||||
'that they are connecting to the correct host. For users to trust the '
|
||||
'key, at least one person (usually the machine owner) must sign the key '
|
||||
'using the regular PGP key signing process. See the '
|
||||
'<a href="http://web.monkeysphere.info/getting-started-ssh/"> '
|
||||
'Monkeysphere SSH documentation</a> for more details.')
|
||||
]
|
||||
|
||||
|
||||
def init():
|
||||
"""Initialize the monkeysphere module."""
|
||||
menu = cfg.main_menu.get('system:index')
|
||||
menu.add_urlname(_('Monkeysphere'), 'glyphicon-certificate',
|
||||
'monkeysphere:index', 970)
|
||||
|
||||
|
||||
def setup(helper, old_version=None):
|
||||
"""Install and configure the module."""
|
||||
helper.install(['monkeysphere'])
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
{% extends "base.html" %}
|
||||
{% extends "app.html" %}
|
||||
{% comment %}
|
||||
#
|
||||
# This file is part of Plinth.
|
||||
@ -30,22 +30,7 @@
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block content %}
|
||||
|
||||
<h2>{% trans "Monkeysphere" %}</h2>
|
||||
|
||||
<p>
|
||||
{% blocktrans trimmed %}
|
||||
With Monkeysphere, a PGP key can be generated for each configured domain
|
||||
serving SSH. The PGP public key can then be uploaded to the PGP
|
||||
keyservers. Users connecting to this machine through SSH can verify that
|
||||
they are connecting to the correct host. For users to trust the key, at
|
||||
least one person (usually the machine owner) must sign the key using the
|
||||
regular PGP key signing process. See the
|
||||
<a href="http://web.monkeysphere.info/getting-started-ssh/">
|
||||
Monkeysphere SSH documentation</a> for more details.
|
||||
{% endblocktrans %}
|
||||
</p>
|
||||
{% block configuration %}
|
||||
|
||||
{% if running %}
|
||||
<p class="running-status-parent">
|
||||
|
||||
@ -28,20 +28,20 @@ from django.views.decorators.http import require_POST
|
||||
import json
|
||||
|
||||
from plinth import actions
|
||||
from plinth import package
|
||||
from plinth.modules import monkeysphere
|
||||
from plinth.modules import names
|
||||
|
||||
publish_process = None
|
||||
|
||||
|
||||
@package.required(['monkeysphere'])
|
||||
def index(request):
|
||||
"""Serve configuration page."""
|
||||
_collect_publish_result(request)
|
||||
status = get_status()
|
||||
return TemplateResponse(
|
||||
request, 'monkeysphere.html',
|
||||
{'title': _('Monkeysphere'),
|
||||
{'title': monkeysphere.title,
|
||||
'description': monkeysphere.description,
|
||||
'status': status,
|
||||
'running': bool(publish_process)})
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user