From d55d9ed2665f8669d372a630198d666f352df756 Mon Sep 17 00:00:00 2001 From: LEAN-ESX Date: Tue, 10 Mar 2020 19:50:23 -0700 Subject: [PATCH] luci-app-adbyby-plus: update adblock.sh --- package/lean/luci-app-adbyby-plus/Makefile | 2 +- .../luci-app-adbyby-plus/root/etc/init.d/adbyby | 1 + .../root/usr/share/adbyby/adblock.sh | 14 ++++---------- 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/package/lean/luci-app-adbyby-plus/Makefile b/package/lean/luci-app-adbyby-plus/Makefile index 08970b2639..dc615b6c70 100644 --- a/package/lean/luci-app-adbyby-plus/Makefile +++ b/package/lean/luci-app-adbyby-plus/Makefile @@ -10,7 +10,7 @@ LUCI_DEPENDS:=+adbyby +wget +ipset +dnsmasq-full LUCI_PKGARCH:=all PKG_NAME:=luci-app-adbyby-plus PKG_VERSION:=2.0 -PKG_RELEASE:=61 +PKG_RELEASE:=63 include $(TOPDIR)/feeds/luci/luci.mk diff --git a/package/lean/luci-app-adbyby-plus/root/etc/init.d/adbyby b/package/lean/luci-app-adbyby-plus/root/etc/init.d/adbyby index e0fb533adf..4a9dc56025 100755 --- a/package/lean/luci-app-adbyby-plus/root/etc/init.d/adbyby +++ b/package/lean/luci-app-adbyby-plus/root/etc/init.d/adbyby @@ -106,6 +106,7 @@ add_dns() { mkdir -p /var/etc/dnsmasq-adbyby.d mkdir -p /tmp/dnsmasq.d + mkdir -p /usr/share/adbyby/rules/host /usr/share/adbyby/rules/data awk '!/^$/&&!/^#/{printf("ipset=/%s/'"adbyby_esc"'\n",$0)}' $PROG_PATH/adesc.conf > /var/etc/dnsmasq-adbyby.d/06-dnsmasq.esc awk '!/^$/&&!/^#/{printf("address=/%s/'"0.0.0.0"'\n",$0)}' $PROG_PATH/adblack.conf > /var/etc/dnsmasq-adbyby.d/07-dnsmasq.black cat > /tmp/dnsmasq.d/dnsmasq-adbyby.conf < /tmp/dnsmasq.adblock -if [ -s "/tmp/dnsmasq.adblock" ];then - sed -i '/youku.com/d' /tmp/dnsmasq.adblock - if ( ! cmp -s /tmp/dnsmasq.adblock /usr/share/adbyby/dnsmasq.adblock );then - mv /tmp/dnsmasq.adblock /usr/share/adbyby/dnsmasq.adblock - fi +wget-ssl --no-check-certificate -O - 'https://easylist-downloads.adblockplus.org/easylistchina+easylist.txt' > /tmp/adnew.conf +if [ -s "/tmp/adnew.conf" ];then + /usr/share/adbyby/ad-update fi -rm -rf /tmp/adbyby.updated && /etc/init.d/adbyby restart - +rm -f /tmp/adbyby.updated && /etc/init.d/adbyby restart