diff --git a/package/lean/luci-app-sfe/luasrc/model/cbi/sfe.lua b/package/lean/luci-app-sfe/luasrc/model/cbi/sfe.lua index cb45d10aad..6248f294c4 100755 --- a/package/lean/luci-app-sfe/luasrc/model/cbi/sfe.lua +++ b/package/lean/luci-app-sfe/luasrc/model/cbi/sfe.lua @@ -61,11 +61,12 @@ o:depends("dns", 1) o = s:option(Value, "dns_server", translate("Upsteam DNS Server")) o.default = "114.114.114.114,114.114.115.115,223.5.5.5,223.6.6.6,180.76.76.76,119.29.29.29,119.28.28.28,1.2.4.8,210.2.4.8" o.description = translate("Muitiple DNS server can saperate with ','") +o:depends("dnscache_enable", 1) +o:depends("dnscache_enable", 2) o = s:option(Value, "ipv6dns_server", translate("Upsteam IPV6 DNS Server")) o.default = "2001:4860:4860::8888,2001:4860:4860::8844,2001:2001::1111,2001:2001::1001,2400:da00::6666,240C::6666,240C::6644" o.description = translate("Muitiple IPV6 DNS server can saperate with ','") o:depends("dnscache_enable", 2) -o:depends("dnscache_enable", 3) return m diff --git a/package/lean/luci-app-sfe/root/etc/init.d/sfe b/package/lean/luci-app-sfe/root/etc/init.d/sfe index c663307e48..d80d20cba0 100755 --- a/package/lean/luci-app-sfe/root/etc/init.d/sfe +++ b/package/lean/luci-app-sfe/root/etc/init.d/sfe @@ -252,9 +252,11 @@ start_service() { kill -9 $(ps | grep dnscache-while.sh | grep -v "grep" | awk '{print $1}') >/dev/null 2>&1 stop_dnscache sleep 1 + rm -f /var/log/dnscache.file + rm -f /etc/AdGuardHome/data/querylog.json* if [ $dnscache_enable = "1" ]; then start_pdnsd - elif [ $dnscache_enable = "2" ] || [ $dnscache_enable = "3" ]; then + elif [ $dnscache_enable = "2" ]; then start_dnsforwarder elif [ $dnscache_enable = "3" ]; then AdGuardHome -c /etc/AdGuardHome/AdGuardHome.yaml -w /etc/AdGuardHome >/dev/null 2>&1 &