From 5183fd90b4fb0ff44f14f450f93c269781abee59 Mon Sep 17 00:00:00 2001 From: LEAN-ESX Date: Tue, 10 Mar 2020 03:26:57 -0700 Subject: [PATCH] luci-app-adbyby-plus: fix Adblock Plus host update --- package/lean/luci-app-adbyby-plus/Makefile | 2 +- .../root/usr/share/adbyby/ad-update | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100755 package/lean/luci-app-adbyby-plus/root/usr/share/adbyby/ad-update diff --git a/package/lean/luci-app-adbyby-plus/Makefile b/package/lean/luci-app-adbyby-plus/Makefile index 0d9051d0c..ddf7cee3b 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:=55 +PKG_RELEASE:=56 include $(TOPDIR)/feeds/luci/luci.mk diff --git a/package/lean/luci-app-adbyby-plus/root/usr/share/adbyby/ad-update b/package/lean/luci-app-adbyby-plus/root/usr/share/adbyby/ad-update new file mode 100755 index 000000000..77b43438f --- /dev/null +++ b/package/lean/luci-app-adbyby-plus/root/usr/share/adbyby/ad-update @@ -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