Fix Pi-hole prepare script replace behavior

This commit is contained in:
Fizzlepoof
2026-05-15 14:37:54 +00:00
parent 5cc5b5f569
commit cb8d6a030b

View File

@@ -36,7 +36,10 @@ mkdir -p \
"$APPDATA_PIHOLE_ROOT/etc-dnsmasq.d" \ "$APPDATA_PIHOLE_ROOT/etc-dnsmasq.d" \
"$APPDATA_UNBOUND_ROOT/var" "$APPDATA_UNBOUND_ROOT/var"
cp "$STACK_DIR/unbound.conf" "$APPDATA_UNBOUND_ROOT/unbound.conf" UNBOUND_TARGET="$APPDATA_UNBOUND_ROOT/unbound.conf"
UNBOUND_TMP="$APPDATA_UNBOUND_ROOT/.unbound.conf.tmp.$$"
cp "$STACK_DIR/unbound.conf" "$UNBOUND_TMP"
mv -f "$UNBOUND_TMP" "$UNBOUND_TARGET"
if [[ ! -s "$APPDATA_UNBOUND_ROOT/var/root.hints" ]]; then if [[ ! -s "$APPDATA_UNBOUND_ROOT/var/root.hints" ]]; then
curl -fsSL -o "$APPDATA_UNBOUND_ROOT/var/root.hints" https://www.internic.net/domain/named.cache curl -fsSL -o "$APPDATA_UNBOUND_ROOT/var/root.hints" https://www.internic.net/domain/named.cache