mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-19 14:13:30 +00:00
speedup adbyby plus restart
This commit is contained in:
parent
3ac15bbed8
commit
1ef60c4d08
@ -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:=33
|
||||
PKG_RELEASE:=35
|
||||
|
||||
include $(TOPDIR)/feeds/luci/luci.mk
|
||||
|
||||
|
@ -172,18 +172,20 @@ start()
|
||||
[ ! -d "/tmp/adbyby" ] && mkdir -p /tmp/adbyby && cp -a $PROG_PATH/data /tmp/adbyby/
|
||||
mount --bind /tmp/adbyby/data $PROG_PATH/data
|
||||
fi
|
||||
touch /tmp/adbyby.mem
|
||||
wget_ok="0"
|
||||
while [ "$wget_ok" = "0" ]
|
||||
do
|
||||
wget-ssl --spider --quiet --tries=1 --timeout=3 www.baidu.com
|
||||
if [ "$?" == "0" ]; then
|
||||
wget_ok="1"
|
||||
/usr/share/adbyby/adupdate.sh
|
||||
else
|
||||
sleep 10
|
||||
if [ ! -f "/tmp/adbyby.updated" ];then
|
||||
touch /tmp/adbyby.mem
|
||||
wget_ok="0"
|
||||
while [ "$wget_ok" = "0" ]
|
||||
do
|
||||
wget-ssl --spider --quiet --tries=1 --timeout=3 www.baidu.com
|
||||
if [ "$?" == "0" ]; then
|
||||
wget_ok="1"
|
||||
/usr/share/adbyby/adupdate.sh
|
||||
else
|
||||
sleep 10
|
||||
fi
|
||||
done
|
||||
fi
|
||||
done
|
||||
fi
|
||||
rm -f /tmp/adbyby.mem
|
||||
echo "add adbyby rules"
|
||||
|
@ -21,4 +21,6 @@ fi
|
||||
|
||||
rm -f /tmp/lazy.txt /tmp/video.txt /tmp/user.action
|
||||
|
||||
echo $(date) > /tmp/adbyby.updated
|
||||
|
||||
[ ! -f "/tmp/adbyby.mem" ] && /etc/init.d/adbyby restart
|
||||
|
Loading…
Reference in New Issue
Block a user