From 1d49b6e02093cbe9d8458c12c480b1ca102cac1e Mon Sep 17 00:00:00 2001 From: klever1988 <56048681+klever1988@users.noreply.github.com> Date: Wed, 18 Mar 2020 19:04:49 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BC=93=E5=AD=98=E7=BB=93=E6=9E=9C=EF=BC=8C?= =?UTF-8?q?=E8=8A=82=E7=9C=81io?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 每次都要find /lib,挺占cpu时间的 --- net/ddns-scripts/files/dynamic_dns_functions.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/net/ddns-scripts/files/dynamic_dns_functions.sh b/net/ddns-scripts/files/dynamic_dns_functions.sh index 7128807a..7dbdb20e 100755 --- a/net/ddns-scripts/files/dynamic_dns_functions.sh +++ b/net/ddns-scripts/files/dynamic_dns_functions.sh @@ -80,7 +80,12 @@ WGET_SSL=$(which wget-ssl) CURL=$(which curl) # CURL_PROXY not empty then Proxy support available -CURL_PROXY=$(find /lib /usr/lib -name libcurl.so* -exec strings {} 2>/dev/null \; | grep -im1 "all_proxy") +if [ -f /tmp/vCURL_PROXY ]; then + CURL_PROXY=$(cat /tmp/vCURL_PROXY); +else + CURL_PROXY=$(find /lib /usr/lib -name libcurl.so* -exec strings {} 2>/dev/null \; | grep -im1 "all_proxy") + echo $CURL_PROXY>/tmp/vCURL_PROXY +fi UCLIENT_FETCH=$(which uclient-fetch)