mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
diagnostics: Use new component based API for all diagnostic tests
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
1 parent
1f14c42af5
commit
2ebb565c92
43 files changed
+334
-616
No files matched your search
@@ -85,6 +85,17 @@ class LetsEncryptApp(app_module.App):
|
||||
parent_url_name='system')
|
||||
self.add(menu_item)
|
||||
|
||||
def diagnose(self):
|
||||
"""Run diagnostics and return the results."""
|
||||
results = super().diagnose()
|
||||
|
||||
for domain in names.components.DomainName.list():
|
||||
if domain.domain_type.can_have_certificate:
|
||||
results.append(
|
||||
action_utils.diagnose_url('https://' + domain.name))
|
||||
|
||||
return results
|
||||
|
||||
|
||||
def init():
|
||||
"""Initialize the module."""
|
||||
@@ -106,17 +117,6 @@ def setup(helper, old_version=None):
|
||||
['setup', '--old-version', str(old_version)])
|
||||
|
||||
|
||||
def diagnose():
|
||||
"""Run diagnostics and return the results."""
|
||||
results = []
|
||||
|
||||
for domain in names.components.DomainName.list():
|
||||
if domain.domain_type.can_have_certificate:
|
||||
results.append(action_utils.diagnose_url('https://' + domain.name))
|
||||
|
||||
return results
|
||||
|
||||
|
||||
def certificate_obtain(domain):
|
||||
"""Obtain a certificate for a domain and notify handlers."""
|
||||
actions.superuser_run('letsencrypt', ['obtain', '--domain', domain])
|
||||
|
||||
Reference in new issue
Block a user