From 80d6eac5e90203c26c21d5fb75005c3a6bc87657 Mon Sep 17 00:00:00 2001 From: lean Date: Mon, 21 Jun 2021 10:01:31 +0800 Subject: [PATCH] uclient: sylink to wget-ssl --- include/target.mk | 2 +- .../root/usr/share/adbyby/adbybyupdate.sh | 8 ++++---- .../root/usr/share/adbyby/adupdate.sh | 6 +++--- package/libs/uclient/Makefile | 4 +++- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/include/target.mk b/include/target.mk index 924c7fb14..db21da874 100644 --- a/include/target.mk +++ b/include/target.mk @@ -47,7 +47,7 @@ DEFAULT_PACKAGES.router:=\ iptables \ ppp \ ppp-mod-pppoe \ - luci-newapi block-mount coremark kmod-nf-nathelper kmod-nf-nathelper-extra kmod-ipt-raw wget-ssl \ + luci-newapi block-mount coremark kmod-nf-nathelper kmod-nf-nathelper-extra kmod-ipt-raw \ default-settings luci luci-app-ddns luci-app-upnp luci-app-autoreboot \ luci-app-filetransfer luci-app-vsftpd luci-app-ssr-plus luci-app-unblockmusic \ luci-app-arpbind luci-app-vlmcsd luci-app-wol luci-app-ramfree \ diff --git a/package/lean/luci-app-adbyby-plus/root/usr/share/adbyby/adbybyupdate.sh b/package/lean/luci-app-adbyby-plus/root/usr/share/adbyby/adbybyupdate.sh index 818e162a4..5143cca3d 100755 --- a/package/lean/luci-app-adbyby-plus/root/usr/share/adbyby/adbybyupdate.sh +++ b/package/lean/luci-app-adbyby-plus/root/usr/share/adbyby/adbybyupdate.sh @@ -4,11 +4,11 @@ if [ ! -f "/tmp/adbyby.updated" ];then wget_ok="0" while [ "$wget_ok" = "0" ] do - uclient-fetch --spider --quiet --tries=1 --timeout=3 www.baidu.com + uclient-fetch --spider --quiet --timeout=3 http://www.baidu.com if [ "$?" == "0" ]; then wget_ok="1" - touch /tmp/md5.json && uclient-fetch --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 + touch /tmp/md5.json && uclient-fetch --no-check-certificate -T 10 -O /tmp/md5.json https://adbyby.coding.net/p/xwhyc-rules/d/xwhyc-rules/git/raw/master/md5.json adm5=$(md5sum /tmp/md5.json | awk -F' ' '{print $1}') touch /tmp/adbyby/admd5.json && bmd5=$(md5sum /tmp/adbyby/admd5.json | awk -F' ' '{print $1}') if [ "$adm5" == "$bmd5" ];then @@ -17,8 +17,8 @@ if [ ! -f "/tmp/adbyby.updated" ];then exit 0 elif [ -s /tmp/md5.json ];then - touch /tmp/lazy.txt && uclient-fetch --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 && uclient-fetch --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/lazy.txt && uclient-fetch --no-check-certificate -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 && uclient-fetch --no-check-certificate -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 diff --git a/package/lean/luci-app-adbyby-plus/root/usr/share/adbyby/adupdate.sh b/package/lean/luci-app-adbyby-plus/root/usr/share/adbyby/adupdate.sh index 28125d455..048e70790 100755 --- a/package/lean/luci-app-adbyby-plus/root/usr/share/adbyby/adupdate.sh +++ b/package/lean/luci-app-adbyby-plus/root/usr/share/adbyby/adupdate.sh @@ -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://adbyby.coding.net/p/xwhyc-rules/d/xwhyc-rules/git/raw/master/md5.json +touch /tmp/md5.json && wget-ssl --no-check-certificate -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://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/lazy.txt && wget-ssl --no-check-certificate -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 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}') diff --git a/package/libs/uclient/Makefile b/package/libs/uclient/Makefile index 398a27bb9..79111ff37 100644 --- a/package/libs/uclient/Makefile +++ b/package/libs/uclient/Makefile @@ -1,7 +1,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=uclient -PKG_RELEASE=1 +PKG_RELEASE=3 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/uclient.git @@ -45,6 +45,8 @@ endef define Package/uclient-fetch/install $(INSTALL_DIR) $(1)/bin $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/uclient-fetch $(1)/bin/ + $(INSTALL_DIR) $(1)/usr/bin + $(LN) /bin/uclient-fetch $(1)/usr/bin/wget-ssl endef $(eval $(call BuildPackage,libuclient))