From dedb19bd817aea3781775fd642e8987b1a0c70b4 Mon Sep 17 00:00:00 2001 From: Chris Wanstrath <2+defunkt@users.noreply.github.com> Date: Fri, 26 Sep 2025 11:30:25 -0700 Subject: [PATCH] fun --- app/src/dns.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/src/dns.ts b/app/src/dns.ts index 0e8985e..ba3e2aa 100644 --- a/app/src/dns.ts +++ b/app/src/dns.ts @@ -16,6 +16,8 @@ const host = hostRaw.toString().trim() let dnsInit = false export async function initDNS() { + dnsInit = true + apps().forEach(publishAppDNS) const signals = ["SIGINT", "SIGTERM"] @@ -26,15 +28,12 @@ export async function initDNS() { process.exit(0) }) ) - - dnsInit = true } export function publishAppDNS(app: string) { if (!dnsInit) throw "publishAppDNS() must be called after initDNS()" if (process.env.NODE_ENV !== "production") return - if (!dnsEntries[app]) dnsEntries[app] = Bun.spawn(["avahi-publish", "-a", `${app}.${host}.local`, "-R", ip])