mirror of
https://github.com/hanwckf/immortalwrt-mt798x.git
synced 2025-01-10 11:09:57 +08:00
luci-app-adbyby-plus: avoid download loop from update server
This commit is contained in:
parent
60999b0cff
commit
a074069eb8
@ -65,8 +65,10 @@ ip_rule()
|
||||
|
||||
ipset -N adbyby_esc hash:ip
|
||||
$ipt_n -A ADBYBY -m set --match-set adbyby_esc dst -j RETURN
|
||||
|
||||
for i in $(seq 0 100)
|
||||
|
||||
local icount=$(uci show unblockmusic | grep 'filter_mode' | wc -l)
|
||||
let icount=icount-1
|
||||
for i in $(seq 0 $icount)
|
||||
do
|
||||
local ip=$(uci_get_by_type acl_rule ipaddr '' $i)
|
||||
local mode=$(uci_get_by_type acl_rule filter_mode '' $i)
|
||||
@ -225,6 +227,3 @@ boot()
|
||||
mkdir -p /tmp/adbyby && cp -a /usr/share/adbyby /tmp/
|
||||
start
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -5,4 +5,6 @@ if [ -s "/tmp/adnew.conf" ];then
|
||||
/usr/share/adbyby/ad-update
|
||||
fi
|
||||
|
||||
rm -f /tmp/adbyby.updated && /etc/init.d/adbyby restart
|
||||
rm -f /tmp/adbyby.updated
|
||||
sleep 10
|
||||
/etc/init.d/adbyby restart
|
||||
|
@ -15,7 +15,7 @@ if [ ! -f "/tmp/adbyby.updated" ];then
|
||||
echo "Rules MD5 are the same!"
|
||||
echo $(date "+%Y-%m-%d %H:%M:%S") > /tmp/adbyby.updated
|
||||
exit 0
|
||||
else
|
||||
elif [ -s /tmp/md5.json ];then
|
||||
|
||||
touch /tmp/lazy.txt && wget-ssl --no-check-certificate -t 1 -T 10 -O /tmp/lazy.txt https://adbyby.coding.net/p/xwhyc-rules/d/xwhyc-rules/git/raw/master/lazy.txt
|
||||
touch /tmp/video.txt && wget-ssl --no-check-certificate -t 1 -T 10 -O /tmp/video.txt https://adbyby.coding.net/p/xwhyc-rules/d/xwhyc-rules/git/raw/master/video.txt
|
||||
@ -43,6 +43,6 @@ if [ ! -f "/tmp/adbyby.updated" ];then
|
||||
|
||||
rm -f /tmp/adbyby/data/*.bak
|
||||
|
||||
kill -9 $(busybox ps -w | grep "adbyby --no-daemon" | grep -v grep | awk '{print $1}') >/dev/null 2>&1
|
||||
kill -9 $(busybox ps -w | grep 'adbyby --no-daemon' | grep -v grep | awk '{print $1}') >/dev/null 2>&1
|
||||
fi
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user