mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-19 03:43:29 +00:00
let adbyby plus can autoupdate rules in dhcp client network environment for XueMao
This commit is contained in:
parent
1c4bad1c05
commit
41821e23c7
@ -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:=32
|
||||
PKG_RELEASE:=33
|
||||
|
||||
include $(TOPDIR)/feeds/luci/luci.mk
|
||||
|
||||
|
@ -172,7 +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
|
||||
fi
|
||||
done
|
||||
fi
|
||||
rm -f /tmp/adbyby.mem
|
||||
echo "add adbyby rules"
|
||||
add_rules
|
||||
$PROG_PATH/adbyby &>/dev/null &
|
||||
|
@ -21,4 +21,4 @@ fi
|
||||
|
||||
rm -f /tmp/lazy.txt /tmp/video.txt /tmp/user.action
|
||||
|
||||
/etc/init.d/adbyby restart
|
||||
[ ! -f "/tmp/adbyby.mem" ] && /etc/init.d/adbyby restart
|
||||
|
Loading…
Reference in New Issue
Block a user