mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-05-27 10:44:33 +00:00
names: Introduce method to check if resolved is installed
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: Veiko Aasa <veiko17@disroot.org>
This commit is contained in:
parent
cfe3946b9a
commit
dd16034e3c
@ -4,6 +4,7 @@ FreedomBox app to configure name services.
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
import pathlib
|
||||||
import socket
|
import socket
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
@ -209,3 +210,8 @@ def get_available_tls_domains():
|
|||||||
"""Return an iterator with all domains able to have a certificate."""
|
"""Return an iterator with all domains able to have a certificate."""
|
||||||
return (domain.name for domain in components.DomainName.list()
|
return (domain.name for domain in components.DomainName.list()
|
||||||
if domain.domain_type.can_have_certificate)
|
if domain.domain_type.can_have_certificate)
|
||||||
|
|
||||||
|
|
||||||
|
def is_resolved_installed():
|
||||||
|
"""Return whether systemd-resolved is installed."""
|
||||||
|
return pathlib.Path('/usr/bin/resolvectl').exists()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user