mirror of
https://github.com/acmesh-official/acme.sh.git
synced 2025-05-05 23:17:41 +00:00
add retry to curl
This commit is contained in:
parent
4cabf84be9
commit
40b945f2c7
10
acme.sh
10
acme.sh
@ -1916,6 +1916,16 @@ _post() {
|
||||
if [ "$HTTPS_INSECURE" ]; then
|
||||
_CURL="$_CURL --insecure "
|
||||
fi
|
||||
|
||||
if [ "$_CURL_RETRY" ]; then
|
||||
_re='^[0-9]+$'
|
||||
if [ "$_CURL_RETRY" =~ "$re" ]; then
|
||||
if [ "$_CURL_RETRY" -lt 1 ] || [ "$_CURL_RETRY" -gt 3 ]; then
|
||||
_CURL="$_CURL --retry $_CURL_RETRY "
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$httpmethod" = "HEAD" ]; then
|
||||
_CURL="$_CURL -I "
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user