21 lines
661 B
Shell
21 lines
661 B
Shell
|
|
#!/bin/bash
|
||
|
|
# Install the lab.internal resolver on rpi (the WireGuard hub).
|
||
|
|
# Run as root from a checkout of sirius/homek8s:
|
||
|
|
# bash infrastructure/networking/internal/dns/install-rpi-dns.sh
|
||
|
|
#
|
||
|
|
# Re-run after a Pi reinstall or after editing the records. Idempotent.
|
||
|
|
set -euo pipefail
|
||
|
|
cd "$(dirname "$0")"
|
||
|
|
|
||
|
|
install -m 0644 lab-internal.conf /etc/dnsmasq.d/lab-internal.conf
|
||
|
|
install -m 0644 lab-internal.hosts /etc/dnsmasq-lab-internal.hosts
|
||
|
|
|
||
|
|
bash rpi-ufw-dns.sh
|
||
|
|
|
||
|
|
# dnsmasq is already enabled at boot on rpi; make that explicit, not assumed.
|
||
|
|
systemctl enable dnsmasq
|
||
|
|
systemctl restart dnsmasq
|
||
|
|
|
||
|
|
sleep 1
|
||
|
|
systemctl is-active dnsmasq
|
||
|
|
ss -lntup | grep ':53 ' || true
|