mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-19 14:13:30 +00:00
luci-app-ssr-plus: add support dnsmasq format ad-filter
This commit is contained in:
parent
418464a36a
commit
f16852f476
@ -1,7 +1,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-ssr-plus
|
||||
PKG_VERSION:=158
|
||||
PKG_VERSION:=159
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
|
||||
|
@ -136,6 +136,7 @@ if sret== 0 then
|
||||
luci.sys.exec("cp -f /tmp/ad.conf /etc/dnsmasq.ssr/ad.conf")
|
||||
retstring=tostring(math.ceil(tonumber(icount)))
|
||||
if oldcount==0 then
|
||||
luci.sys.exec("cp -f /etc/dnsmasq.ssr/ad.conf /tmp/dnsmasq.ssr/ad.conf")
|
||||
luci.sys.call("/etc/init.d/dnsmasq restart")
|
||||
end
|
||||
else
|
||||
|
@ -1,5 +1,9 @@
|
||||
#!/bin/sh -e
|
||||
if [ -f /tmp/adnew.conf ]; then
|
||||
cat /tmp/adnew.conf | grep ^\|\|[^\*]*\^$ | sed -e 's:||:address\=\/:' -e 's:\^:/0\.0\.0\.0:' > /tmp/ad.conf
|
||||
if (grep -wq "address=" /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
|
||||
|
Loading…
Reference in New Issue
Block a user