luci-app-sfe: fix AdGuardHome Support

This commit is contained in:
CN_SZTL 2019-08-03 02:24:08 +08:00
parent c94342a29b
commit 957ba78708
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
2 changed files with 5 additions and 2 deletions

View File

@ -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

View File

@ -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 &