mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-07-11 16:40:32 +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"
|
||||
|
||||
if bashio::config.has_value 'DNS_server'; then
|
||||
if ! bashio::config.is_true "openvpn_enabled" && ! bashio::config.is_true "wireguard_enabled"; then
|
||||
# Define variables
|
||||
DNSSERVER=$(bashio::config 'DNS_server')
|
||||
DNS=""
|
||||
@@ -37,7 +38,9 @@ if bashio::config.has_value 'DNS_server'; then
|
||||
else
|
||||
bashio::log.warning "No valid DNS were found. Using default router (or HA) dns servers."
|
||||
fi
|
||||
|
||||
else
|
||||
bashio::log.warning "DNS servers are enabled but a vpn is enabled. Resolv will be handled through the vpn script"
|
||||
fi
|
||||
else
|
||||
bashio::log.info "DNS Servers option empty. Using default router (or HA) dns servers."
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user