mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-05 15:15:58 +02:00
Apply dns servers only if no vpn option is true
https://github.com/alexbelgium/hassio-addons/issues/2449
This commit is contained in:
@@ -9,6 +9,7 @@ set -e
|
|||||||
# Avoid usage of local dns such as adguard home or pihole\n"
|
# Avoid usage of local dns such as adguard home or pihole\n"
|
||||||
|
|
||||||
if bashio::config.has_value 'DNS_server'; then
|
if bashio::config.has_value 'DNS_server'; then
|
||||||
|
if ! bashio::config.is_true "openvpn_enabled" && ! bashio::config.is_true "wireguard_enabled"; then
|
||||||
# Define variables
|
# Define variables
|
||||||
DNSSERVER=$(bashio::config 'DNS_server')
|
DNSSERVER=$(bashio::config 'DNS_server')
|
||||||
DNS=""
|
DNS=""
|
||||||
@@ -37,7 +38,9 @@ if bashio::config.has_value 'DNS_server'; then
|
|||||||
else
|
else
|
||||||
bashio::log.warning "No valid DNS were found. Using default router (or HA) dns servers."
|
bashio::log.warning "No valid DNS were found. Using default router (or HA) dns servers."
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
bashio::log.warning "DNS servers are enabled but a vpn is enabled. Resolv will be handled through the vpn script"
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
bashio::log.info "DNS Servers option empty. Using default router (or HA) dns servers."
|
bashio::log.info "DNS Servers option empty. Using default router (or HA) dns servers."
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user