Fix Pi-hole prepare script replace behavior
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user