From 7c1852edc1cb39664608c8d03ca6337a20581397 Mon Sep 17 00:00:00 2001 From: coolsnowwolf Date: Sat, 9 Sep 2017 03:28:15 +0800 Subject: [PATCH] fix adbyby warning when clean-up black ip list --- package/lean/luci-app-adbyby-plus/Makefile | 2 +- package/lean/luci-app-adbyby-plus/root/etc/init.d/adbyby | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/package/lean/luci-app-adbyby-plus/Makefile b/package/lean/luci-app-adbyby-plus/Makefile index 5c3411e3c..39747cf85 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 +coreutils +coreutils-nohup +dnsmasq-full LUCI_PKGARCH:=all PKG_NAME:=luci-app-adbyby-plus PKG_VERSION:=2.0 -PKG_RELEASE:=17 +PKG_RELEASE:=18 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 afbd3a7bc..47147cee9 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 @@ -81,7 +81,7 @@ ip_rule() echo "create blockip hash:net family inet hashsize 1024 maxelem 65536" > /tmp/blockip.ipset awk '!/^$/&&!/^#/{printf("add blockip %s'" "'\n",$0)}' /usr/share/adbyby/blockip.conf >> /tmp/blockip.ipset - ipset -! restore < /tmp/blockip.ipset + ipset -! restore < /tmp/blockip.ipset 2>/dev/null iptables -I FORWARD -m set --match-set blockip dst -j DROP iptables -I OUTPUT -m set --match-set blockip dst -j DROP } @@ -173,6 +173,7 @@ start() mount --bind /tmp/adbyby/data $PROG_PATH/data fi fi + echo "add adbyby rules" add_rules $PROG_PATH/adbyby &>/dev/null & add_dns