Skip to content
Snippets Groups Projects
Commit d9e945b5 authored by Bob Mottram's avatar Bob Mottram
Browse files

pihole interface

parent ae961d3b
No related branches found
No related tags found
No related merge requests found
......@@ -79,12 +79,11 @@ function pihole_update {
return
fi
if [[ $(config_param_exists WIFI_INTERFACE) == "0" ]]; then
if [ ! -f $HOME/${PROJECT_NAME}-wifi.cfg ]; then
PIHOLE_IFACE=eth0
else
read_config_param WIFI_INTERFACE
PIHOLE_IFACE=$WIFI_INTERFACE
write_config_param "PIHOLE_IFACE" "$PIHOLE_IFACE"
fi
IPv4_address="$(get_ipv4_address)"
......@@ -116,6 +115,7 @@ function pihole_update {
sed -i '/@IPv6@/d' /etc/dnsmasq.d/01-pihole.conf
fi
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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment