diff --git a/openmptcprouter/files/etc/uci-defaults/1940-omr-dns b/openmptcprouter/files/etc/uci-defaults/1940-omr-dns index 7afa1e92e..21efcdfee 100755 --- a/openmptcprouter/files/etc/uci-defaults/1940-omr-dns +++ b/openmptcprouter/files/etc/uci-defaults/1940-omr-dns @@ -43,21 +43,12 @@ if [ "$(uci -q get dhcp.lan.dhcp_options)" = "" ]; then EOF fi -if [ "$(uci -q get openmptcprouter.latest_versions)" = "" ]; then -# uci -q batch <<-EOF >/dev/null -# delete https-dns-proxy.@https-dns-proxy[-1] -# delete https-dns-proxy.@https-dns-proxy[-1] -# commit https-dns-proxy -# EOF +if [ -n "$(uci -q dhcp.@dnsmasq[0].server | grep 127.0.0.1)" ] && [ -z "$(uci -q dhcp.@dnsmasq[0].server | grep 127.0.0.1#5353)" ]; then + /etc/init.d/https-dns-proxy start + /etc/init.d/https-dns-proxy enable +else /etc/init.d/https-dns-proxy stop /etc/init.d/https-dns-proxy disable -# set https-dns-proxy.@https-dns-proxy[-1]=https-dns-proxy -# set https-dns-proxy.@https-dns-proxy[-1].listen_addr='127.0.0.1' -# set https-dns-proxy.@https-dns-proxy[-1].user='nobody' -# set https-dns-proxy.@https-dns-proxy[-1].group='nogroup' -# set https-dns-proxy.@https-dns-proxy[-1].bootstrap_dns='1.1.1.1,1.0.0.1' -# set https-dns-proxy.@https-dns-proxy[-1].resolver_url='https://cloudflare-dns.com/dns-query' -# set https-dns-proxy.@https-dns-proxy[-1].listen_port='5354' fi #uci -q batch <<-EOF >/dev/null