mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-02-12 18:41:51 +00:00
Remove default DNS if PiHole is enabled
This commit is contained in:
parent
c28eb52007
commit
4c3688a642
1 changed files with 5 additions and 0 deletions
|
@ -483,6 +483,7 @@ _get_pihole() {
|
|||
if [ "$pihole" = "true" ] && [ -z "$(uci -q get dhcp.@dnsmasq[0].server | grep $host_ip)" ]; then
|
||||
uci -q del_list dhcp.@dnsmasq[0].server="$(uci -q get dhcp.@dnsmasq[0].server | tr ' ' '\n' | grep '#53' | grep '10.2')"
|
||||
uci -q batch <<-EOF >/dev/null
|
||||
del_list dhcp.@dnsmasq[0].server="127.0.0.1#5353"
|
||||
add_list dhcp.@dnsmasq[0].server="$host_ip#53"
|
||||
set dhcp.@dnsmasq[0].rebind_protection='0'
|
||||
commit dhcp
|
||||
|
@ -496,6 +497,7 @@ _get_pihole() {
|
|||
if [ "$pihole" = "true" ] && [ -z "$(uci -q get dhcp.@dnsmasq[0].server | grep $host_ip)" ]; then
|
||||
uci -q del_list dhcp.@dnsmasq[0].server="$(uci -q get dhcp.@dnsmasq[0].server | tr ' ' '\n' | grep '#53' | grep '10.2')"
|
||||
uci -q batch <<-EOF >/dev/null
|
||||
del_list dhcp.@dnsmasq[0].server="127.0.0.1#5353"
|
||||
add_list dhcp.@dnsmasq[0].server="$host_ip#53"
|
||||
set dhcp.@dnsmasq[0].rebind_protection='0'
|
||||
commit dhcp
|
||||
|
@ -509,6 +511,7 @@ _get_pihole() {
|
|||
if [ "$pihole" = "true" ] && [ -z "$(uci -q get dhcp.@dnsmasq[0].server | grep $host_ip)" ]; then
|
||||
uci -q del_list dhcp.@dnsmasq[0].server="$(uci -q get dhcp.@dnsmasq[0].server | tr ' ' '\n' | grep '#53' | grep '10.2')"
|
||||
uci -q batch <<-EOF >/dev/null
|
||||
del_list dhcp.@dnsmasq[0].server="127.0.0.1#5353"
|
||||
add_list dhcp.@dnsmasq[0].server="$host_ip#53"
|
||||
set dhcp.@dnsmasq[0].rebind_protection='0'
|
||||
commit dhcp
|
||||
|
@ -522,6 +525,7 @@ _get_pihole() {
|
|||
if [ "$pihole" = "true" ] && [ -z "$(uci -q get dhcp.@dnsmasq[0].server | grep $host_ip)" ]; then
|
||||
uci -q del_list dhcp.@dnsmasq[0].server="$(uci -q get dhcp.@dnsmasq[0].server | tr ' ' '\n' | grep '#53' | grep '10.2')"
|
||||
uci -q batch <<-EOF >/dev/null
|
||||
del_list dhcp.@dnsmasq[0].server="127.0.0.1#5353"
|
||||
add_list dhcp.@dnsmasq[0].server="$host_ip#53"
|
||||
set dhcp.@dnsmasq[0].rebind_protection='0'
|
||||
commit dhcp
|
||||
|
@ -535,6 +539,7 @@ _get_pihole() {
|
|||
if [ "$pihole" = "true" ] && [ -z "$(uci -q get dhcp.@dnsmasq[0].server | grep $host_ip)" ]; then
|
||||
uci -q del_list dhcp.@dnsmasq[0].server="$(uci -q get dhcp.@dnsmasq[0].server | tr ' ' '\n' | grep '#53' | grep '10.2')"
|
||||
uci -q batch <<-EOF >/dev/null
|
||||
del_list dhcp.@dnsmasq[0].server="127.0.0.1#5353"
|
||||
add_list dhcp.@dnsmasq[0].server="$host_ip#53"
|
||||
set dhcp.@dnsmasq[0].rebind_protection='0'
|
||||
commit dhcp
|
||||
|
|
Loading…
Reference in a new issue