diff --git a/src/freedombone-app-pihole b/src/freedombone-app-pihole index e3d08d2a..e729df96 100755 --- a/src/freedombone-app-pihole +++ b/src/freedombone-app-pihole @@ -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