luci-app-adbyby-plus: fix Adblock Plus host update

This commit is contained in:
LEAN-ESX 2020-03-10 03:26:57 -07:00
parent 830096f960
commit 5183fd90b4
2 changed files with 12 additions and 1 deletions

View File

@ -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:=55
PKG_RELEASE:=56
include $(TOPDIR)/feeds/luci/luci.mk

View File

@ -0,0 +1,11 @@
#!/bin/sh -e
if [ -f /tmp/adnew.conf ]; then
if (grep -wq "address=" /tmp/adnew.conf) ; then
cp /tmp/adnew.conf /tmp/ad.conf
elif (grep -wq "0.0.0.0" /tmp/adnew.conf) ; then
cp /tmp/adnew.conf /tmp/ad.conf
else
cat /tmp/adnew.conf | grep ^\|\|[^\*]*\^$ | sed -e 's:||:address\=\/:' -e 's:\^:/0\.0\.0\.0:' > /tmp/ad.conf
fi
fi
rm -f /tmp/adnew.conf