pihole interface
This commit is contained in:
parent
ae961d3bc3
commit
d9e945b5e7
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue