diff --git a/bin/ ZeroWrt.backup b/bin/ ZeroWrt.backup index 6d3190b..7ad36b6 100644 --- a/bin/ ZeroWrt.backup +++ b/bin/ ZeroWrt.backup @@ -264,7 +264,6 @@ one_click_setup() { # 设置LAN口DNS uci set network.lan.dns='127.0.0.1' uci commit network - /etc/init.d/network restart # 恢复 MosDNS 配置 cp /etc/config/default_mosdns /etc/config/mosdns @@ -313,9 +312,9 @@ one_click_setup() { # AdguardHome 设置 cp /etc/config/default_AdGuardHome /etc/config/AdGuardHome.yaml - sed -i 's/cache_size: .*/cache_size: 0/' /etc/AdGuardHome.yaml - sed -i 's/upstream_mode: .*/upstream_mode: parallel/' /etc/AdGuardHome.yaml - sed -i 's/upstream_dns_file:.*/upstream_dns_file: \/etc\/AdGuardHome-dnslist.yaml/' /etc/AdGuardHome.yaml + sed -i 's/cache_size: .*/cache_size: 0/' /etc/config/AdGuardHome.yaml + sed -i 's/upstream_mode: .*/upstream_mode: parallel/' /etc/config/AdGuardHome.yaml + sed -i 's/upstream_dns_file:.*/upstream_dns_file: \/etc\/AdGuardHome-dnslist.yaml/' /etc/config/AdGuardHome.yaml uci set AdGuardHome.AdGuardHome.enabled='1' uci set AdGuardHome.AdGuardHome.redirect='dnsmasq-upstream' uci commit AdGuardHome @@ -388,7 +387,6 @@ one_click_setup() { # 设置LAN口DNS uci set network.lan.dns='127.0.0.1' uci commit network - /etc/init.d/network restart # 恢复 SmartDNS 配置 cp /etc/config/default_smartdns /etc/config/smartdns @@ -429,9 +427,9 @@ one_click_setup() { # 配置 AdGuardHome cp /etc/config/default_AdGuardHome /etc/config/AdGuardHome.yaml - sed -i 's/upstream_dns_file:.*/upstream_dns_file: \/etc\/AdGuardHome-mosdns.yaml/' /etc/AdGuardHome.yaml - sed -i 's/cache_size: .*/cache_size: 0/' /etc/AdGuardHome.yaml - sed -i 's|upstream_dns_file: ""|upstream_dns_file: "/etc/AdGuardHome-mosdns.yaml"|' /etc/AdGuardHome.yaml + sed -i 's/upstream_dns_file:.*/upstream_dns_file: \/etc\/AdGuardHome-mosdns.yaml/' /etc/config/AdGuardHome.yaml + sed -i 's/cache_size: .*/cache_size: 0/' /etc/config/AdGuardHome.yaml + sed -i 's/upstream_mode: .*/upstream_mode: parallel/' /etc/config/AdGuardHome.yaml uci set AdGuardHome.AdGuardHome.enabled='1' uci set AdGuardHome.AdGuardHome.redirect='dnsmasq-upstream' uci commit AdGuardHome @@ -504,7 +502,6 @@ one_click_setup() { # 取消LAN口DNS uci delete network.lan.dns uci commit network - /etc/init.d/network restart # 恢复 SmartDNS 配置 cp /etc/config/default_smartdns /etc/config/smartdns /etc/init.d/smartdns restart @@ -512,7 +509,11 @@ one_click_setup() { cp /etc/config/default_mosdns /etc/config/mosdns /etc/init.d/mosdns restart # 恢复 adguardhome + uci set AdGuardHome.AdGuardHome.enabled='0' + uci set AdGuardHome.AdGuardHome.redirect='none' cp /etc/config/default_AdGuardHome /etc/config/AdGuardHome.yaml + sed -i 's/upstream_dns_file:.*/upstream_dns_file: \/etc\/AdGuardHome-dns.yaml/' /etc/config/AdGuardHome.yaml + uci commit AdGuardHome /etc/init.d/AdGuardHome restart # 恢复 passwall cp /etc/config/default_passwall /etc/config/passwall