|
@@ -144,6 +144,8 @@ rm_port53()
|
|
if [ "$dnsmasq_port" == "53" ]; then
|
|
if [ "$dnsmasq_port" == "53" ]; then
|
|
dnsmasq_port="1745"
|
|
dnsmasq_port="1745"
|
|
fi
|
|
fi
|
|
|
|
+ elif [ "$dnsmasq_port" == "53" ]; then
|
|
|
|
+ return
|
|
fi
|
|
fi
|
|
config_editor "dns.port" "$dnsmasq_port" "$configpath"
|
|
config_editor "dns.port" "$dnsmasq_port" "$configpath"
|
|
uci set dhcp.@dnsmasq[0].port="53"
|
|
uci set dhcp.@dnsmasq[0].port="53"
|
|
@@ -162,6 +164,8 @@ use_port53()
|
|
if [ "$dnsmasq_port" == "53" ]; then
|
|
if [ "$dnsmasq_port" == "53" ]; then
|
|
AdGuardHome_PORT="1745"
|
|
AdGuardHome_PORT="1745"
|
|
fi
|
|
fi
|
|
|
|
+ elif [ "$AdGuardHome_PORT" == "53" ]; then
|
|
|
|
+ return
|
|
fi
|
|
fi
|
|
config_editor "dns.port" "53" "$configpath"
|
|
config_editor "dns.port" "53" "$configpath"
|
|
uci set dhcp.@dnsmasq[0].port="$AdGuardHome_PORT"
|
|
uci set dhcp.@dnsmasq[0].port="$AdGuardHome_PORT"
|
|
@@ -186,7 +190,7 @@ do_redirect()
|
|
config_get "old_redirect" "$section" "old_redirect" "none"
|
|
config_get "old_redirect" "$section" "old_redirect" "none"
|
|
config_get "old_port" "$section" "old_port" "0"
|
|
config_get "old_port" "$section" "old_port" "0"
|
|
config_get "old_enabled" "$section" "old_enabled" "0"
|
|
config_get "old_enabled" "$section" "old_enabled" "0"
|
|
- if [ "$old_redirect" == "exchange" -a "$AdGuardHome_PORT" == "53" ]; then
|
|
|
|
|
|
+ if [ "$old_enabled" = "1" -a "$old_redirect" == "exchange"]; then
|
|
AdGuardHome_PORT=$(uci get dhcp.@dnsmasq[0].port)
|
|
AdGuardHome_PORT=$(uci get dhcp.@dnsmasq[0].port)
|
|
fi
|
|
fi
|
|
|
|
|