Update dnsmasq config
This commit is contained in:
parent
fae5804c82
commit
2cf05ecaf4
|
@ -106,9 +106,12 @@ function pihole_update {
|
|||
echo 'listen-address=127.0.0.1' >> /etc/dnsmasq.conf
|
||||
echo 'log-queries' >> /etc/dnsmasq.conf
|
||||
|
||||
sed -i "0,/RE/s/server=.*/server=${PIHOLE_DNS1}/" /etc/dnsmasq.d/01-pihole.conf
|
||||
sed -i "1,/RE/s/server=.*/server=${PIHOLE_DNS2}/" /etc/dnsmasq.d/01-pihole.conf
|
||||
sed -i "s|@DNS1@|${PIHOLE_DNS1}|g" /etc/dnsmasq.d/01-pihole.conf
|
||||
sed -i "s|@DNS2@|${PIHOLE_DNS2}|g" /etc/dnsmasq.d/01-pihole.conf
|
||||
sed -i "s|interface=.*|interface=${PIHOLE_IFACE}|g" /etc/dnsmasq.d/01-pihole.conf
|
||||
sed -i "s|@IPv4@|${IPv4_address}|g" /etc/dnsmasq.d/01-pihole.conf
|
||||
sed -i "s|@IPv6@|${IPv6_address}|g" /etc/dnsmasq.d/01-pihole.conf
|
||||
sed -i "s|@HOSTNAME@|$HOSTNAME|g" /etc/dnsmasq.d/01-pihole.conf
|
||||
|
||||
systemctl restart dnsmasq
|
||||
|
||||
|
|
Loading…
Reference in New Issue