mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-17 21:03:30 +00:00
update adbyby rules (#3112)
* 更换adbyby规则更新地址 * 更换adbyby规则更新地址 * 更换adbyby规则更新地址 之前的漏掉了 md5 验证
This commit is contained in:
parent
c42496b73f
commit
56b4df4cdb
@ -8,11 +8,11 @@ if [ ! -f "/tmp/adbyby.updated" ];then
|
||||
wget-ssl --spider --quiet --tries=1 --timeout=3 www.baidu.com
|
||||
if [ "$?" == "0" ]; then
|
||||
wget_ok="1"
|
||||
touch /tmp/lazy.txt && wget-ssl --no-check-certificate -t 1 -T 10 -O /tmp/lazy.txt https://coding.net/u/adbyby/p/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://coding.net/u/adbyby/p/xwhyc-rules/git/raw/master/video.txt
|
||||
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
|
||||
|
||||
touch /tmp/local-md5.json && md5sum /tmp/lazy.txt /tmp/video.txt > /tmp/local-md5.json
|
||||
touch /tmp/md5.json && wget-ssl --no-check-certificate -t 1 -T 10 -O /tmp/md5.json https://coding.net/u/adbyby/p/xwhyc-rules/git/raw/master/md5.json
|
||||
touch /tmp/md5.json && wget-ssl --no-check-certificate -t 1 -T 10 -O /tmp/md5.json https://adbyby.coding.net/p/xwhyc-rules/d/xwhyc-rules/git/raw/master/md5.json
|
||||
|
||||
lazy_local=$(grep 'lazy' /tmp/local-md5.json | awk -F' ' '{print $1}')
|
||||
video_local=$(grep 'video' /tmp/local-md5.json | awk -F' ' '{print $1}')
|
||||
|
@ -3,7 +3,7 @@
|
||||
rm -f /usr/share/adbyby/data/*.bak
|
||||
|
||||
touch /tmp/local-md5.json && md5sum /usr/share/adbyby/data/lazy.txt /usr/share/adbyby/data/video.txt > /tmp/local-md5.json
|
||||
touch /tmp/md5.json && wget-ssl --no-check-certificate -t 1 -T 10 -O /tmp/md5.json https://coding.net/u/adbyby/p/xwhyc-rules/git/raw/master/md5.json
|
||||
touch /tmp/md5.json && wget-ssl --no-check-certificate -t 1 -T 10 -O /tmp/md5.json https://adbyby.coding.net/p/xwhyc-rules/d/xwhyc-rules/git/raw/master/md5.json
|
||||
|
||||
lazy_local=$(grep 'lazy' /tmp/local-md5.json | awk -F' ' '{print $1}')
|
||||
video_local=$(grep 'video' /tmp/local-md5.json | awk -F' ' '{print $1}')
|
||||
@ -12,8 +12,8 @@ video_online=$(sed 's/":"/\n/g' /tmp/md5.json | sed 's/","/\n/g' | sed -n '4
|
||||
|
||||
if [ "$lazy_online"x != "$lazy_local"x -o "$video_online"x != "$video_local"x ]; then
|
||||
echo "MD5 not match! Need update!"
|
||||
touch /tmp/lazy.txt && wget-ssl --no-check-certificate -t 1 -T 10 -O /tmp/lazy.txt https://coding.net/u/adbyby/p/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://coding.net/u/adbyby/p/xwhyc-rules/git/raw/master/video.txt
|
||||
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
|
||||
touch /tmp/local-md5.json && md5sum /tmp/lazy.txt /tmp/video.txt > /tmp/local-md5.json
|
||||
lazy_local=$(grep 'lazy' /tmp/local-md5.json | awk -F' ' '{print $1}')
|
||||
video_local=$(grep 'video' /tmp/local-md5.json | awk -F' ' '{print $1}')
|
||||
|
Loading…
Reference in New Issue
Block a user