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
@@ -22,7 +22,7 @@ import re
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from plinth import action_utils, actions
|
||||
from plinth import actions
|
||||
from plinth import app as app_module
|
||||
from plinth import cfg, menu
|
||||
from plinth.daemon import Daemon
|
||||
@@ -102,7 +102,11 @@ class BindApp(app_module.App):
|
||||
is_external=False)
|
||||
self.add(firewall)
|
||||
|
||||
daemon = Daemon('daemon-bind', managed_services[0])
|
||||
daemon = Daemon(
|
||||
'daemon-bind', managed_services[0], listen_ports=[(53, 'tcp6'),
|
||||
(53, 'udp6'),
|
||||
(53, 'tcp4'),
|
||||
(53, 'udp4')])
|
||||
self.add(daemon)
|
||||
|
||||
|
||||
@@ -129,18 +133,6 @@ def force_upgrade(helper, _packages):
|
||||
return True
|
||||
|
||||
|
||||
def diagnose():
|
||||
"""Run diagnostics and return the results."""
|
||||
results = []
|
||||
|
||||
results.append(action_utils.diagnose_port_listening(53, 'tcp6'))
|
||||
results.append(action_utils.diagnose_port_listening(53, 'udp6'))
|
||||
results.append(action_utils.diagnose_port_listening(53, 'tcp4'))
|
||||
results.append(action_utils.diagnose_port_listening(53, 'udp4'))
|
||||
|
||||
return results
|
||||
|
||||
|
||||
def get_config():
|
||||
"""Get current configuration"""
|
||||
data = [line.strip() for line in open(CONFIG_FILE, 'r')]
|
||||
|
||||
Reference in new issue
Block a user