setupLocalDnsRewrites points every configured domain at the server's LAN IP inside the self-hosted resolver, so app subdomains resolve locally and hit Traefik directly (valid certs, no router hairpin). AdGuard gets a wildcard rewrite per domain via its REST API; Pi-hole gets per-host A records in the supported, mounted custom.list (no wildcard support there). Safe by construction: idempotent, guarded by installed-checks, cannot corrupt the resolver. Hooked into the Apply-DNS actions and resolver install. Also drops the dead HOST_NAME read from the setupDNSIP stub. NOTE: needs a live smoke-test — the AdGuard API call and Pi-hole reload can't be exercised without the running containers. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> Signed-off-by: librelad <librelad@digitalangels.vip>
21 lines
640 B
Bash
Executable File
21 lines
640 B
Bash
Executable File
#!/bin/bash
|
|
|
|
setupDNSIP()
|
|
{
|
|
local app_name="$1"
|
|
|
|
if [[ "$app_name" == "" ]]; then
|
|
isError "Something went wrong...No app name provided..."
|
|
if [[ "$initial_command2" == "terminal" ]]; then
|
|
resetToMenu;
|
|
fi
|
|
fi
|
|
|
|
# STUB: meant to resolve the reachable IP of the given resolver
|
|
# (adguard/pihole) into $dns_ip_setup for updateDNS. Not implemented yet,
|
|
# so updateDNS falls back to CFG_DNS_SERVER_* upstreams. (Previously read
|
|
# CFG_<APP>_HOST_NAME here, which is unused — removed during the per-port
|
|
# subdomain refactor so HOST_NAME has no remaining DNS dependency.)
|
|
:
|
|
}
|