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
@@ -26,7 +26,7 @@ from django.urls import reverse_lazy
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from ruamel.yaml.util import load_yaml_guess_indent
|
||||
|
||||
from plinth import action_utils, actions
|
||||
from plinth import actions
|
||||
from plinth import app as app_module
|
||||
from plinth import frontpage, menu
|
||||
from plinth.daemon import Daemon
|
||||
@@ -104,7 +104,8 @@ class MatrixSynapseApp(app_module.App):
|
||||
self.add(firewall)
|
||||
|
||||
webserver = Webserver('webserver-matrixsynapse',
|
||||
'matrix-synapse-plinth')
|
||||
'matrix-synapse-plinth',
|
||||
urls=['https://{host}/_matrix/client/versions'])
|
||||
self.add(webserver)
|
||||
|
||||
letsencrypt = LetsEncrypt(
|
||||
@@ -116,7 +117,8 @@ class MatrixSynapseApp(app_module.App):
|
||||
managing_app='matrixsynapse')
|
||||
self.add(letsencrypt)
|
||||
|
||||
daemon = Daemon('daemon-matrixsynapse', managed_services[0])
|
||||
daemon = Daemon('daemon-matrixsynapse', managed_services[0],
|
||||
listen_ports=[(8008, 'tcp4'), (8448, 'tcp4')])
|
||||
self.add(daemon)
|
||||
|
||||
|
||||
@@ -152,19 +154,6 @@ def is_setup():
|
||||
return os.path.exists(SERVER_NAME_PATH)
|
||||
|
||||
|
||||
def diagnose():
|
||||
"""Run diagnostics and return the results."""
|
||||
results = []
|
||||
|
||||
results.append(action_utils.diagnose_port_listening(8008, 'tcp4'))
|
||||
results.append(action_utils.diagnose_port_listening(8448, 'tcp4'))
|
||||
results.extend(
|
||||
action_utils.diagnose_url_on_all(
|
||||
'https://{host}/_matrix/client/versions', check_certificate=False))
|
||||
|
||||
return results
|
||||
|
||||
|
||||
def get_domains():
|
||||
"""Return a list of domains this app is interested in."""
|
||||
domain = get_configured_domain_name()
|
||||
|
||||
Reference in new issue
Block a user