Skip to content

Commit

Permalink
luci-app-adbyby-plus: update adblock.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
coolsnowwolf committed Mar 11, 2020
1 parent b9cc436 commit e521bcc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
2 changes: 1 addition & 1 deletion package/lean/luci-app-adbyby-plus/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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:=62
PKG_RELEASE:=63

include $(TOPDIR)/feeds/luci/luci.mk

Expand Down
14 changes: 4 additions & 10 deletions package/lean/luci-app-adbyby-plus/root/usr/share/adbyby/adblock.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
#!/bin/sh

rm -f /tmp/dnsmasq.adblock

wget-ssl --no-check-certificate -O- https://easylist-downloads.adblockplus.org/easylistchina+easylist.txt | grep ^\|\|[^\*]*\^$ | sed -e 's:||:address\=\/:' -e 's:\^:/0\.0\.0\.0:' > /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

0 comments on commit e521bcc

Please sign in to comment.