warn on zeroconf with uds-only

This commit is contained in:
ed 2025-04-13 16:38:29 +00:00
parent ffc1610980
commit 361aebf877

View file

@ -770,6 +770,7 @@ class SvcHub(object):
self.log("optional-dependencies", t, 6) self.log("optional-dependencies", t, 6)
def _check_env(self) -> None: def _check_env(self) -> None:
al = self.args
try: try:
files = os.listdir(E.cfg) files = os.listdir(E.cfg)
except: except:
@ -786,6 +787,21 @@ class SvcHub(object):
if self.args.bauth_last: if self.args.bauth_last:
self.log("root", "WARNING: ignoring --bauth-last due to --no-bauth", 3) self.log("root", "WARNING: ignoring --bauth-last due to --no-bauth", 3)
have_tcp = False
for zs in al.i:
if not zs.startswith("unix:"):
have_tcp = True
if not have_tcp:
zb = False
zs = "z zm zm4 zm6 zmv zmvv zs zsv zv"
for zs in zs.split():
if getattr(al, zs, False):
setattr(al, zs, False)
zb = True
if zb:
t = "only listening on unix-sockets; cannot enable zeroconf/mdns/ssdp as requested"
self.log("root", t, 3)
if not self.args.no_dav: if not self.args.no_dav:
from .dxml import DXML_OK from .dxml import DXML_OK