pihole interface
This commit is contained in:
parent
ae961d3bc3
commit
d9e945b5e7
|
@ -79,12 +79,11 @@ function pihole_update {
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $(config_param_exists WIFI_INTERFACE) == "0" ]]; then
|
if [ ! -f $HOME/${PROJECT_NAME}-wifi.cfg ]; then
|
||||||
PIHOLE_IFACE=eth0
|
PIHOLE_IFACE=eth0
|
||||||
else
|
else
|
||||||
read_config_param WIFI_INTERFACE
|
read_config_param WIFI_INTERFACE
|
||||||
PIHOLE_IFACE=$WIFI_INTERFACE
|
PIHOLE_IFACE=$WIFI_INTERFACE
|
||||||
write_config_param "PIHOLE_IFACE" "$PIHOLE_IFACE"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
IPv4_address="$(get_ipv4_address)"
|
IPv4_address="$(get_ipv4_address)"
|
||||||
|
@ -116,6 +115,7 @@ function pihole_update {
|
||||||
sed -i '/@IPv6@/d' /etc/dnsmasq.d/01-pihole.conf
|
sed -i '/@IPv6@/d' /etc/dnsmasq.d/01-pihole.conf
|
||||||
fi
|
fi
|
||||||
sed -i "s|@HOSTNAME@|$HOSTNAME|g" /etc/dnsmasq.d/01-pihole.conf
|
sed -i "s|@HOSTNAME@|$HOSTNAME|g" /etc/dnsmasq.d/01-pihole.conf
|
||||||
|
sed -i "s|addn-hosts=.*|addn-hosts=${PIHOLE_ADLIST}|g" /etc/dnsmasq.d/01-pihole.conf
|
||||||
|
|
||||||
systemctl restart dnsmasq
|
systemctl restart dnsmasq
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue