Change pihole interface if needed

This commit is contained in:
Bob Mottram 2016-10-21 10:48:39 +01:00
parent 536c078489
commit a4318101ff
1 changed files with 8 additions and 0 deletions

View File

@ -79,6 +79,14 @@ function pihole_update {
return
fi
if [[ $(config_param_exists WIFI_INTERFACE) == "0" ]]; 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)
IPv6_address=$(get_ipv6_address)