reduced number of retries by 1
This commit is contained in:
parent
feb651d698
commit
bdd4db2df9
11
get-certs.sh
11
get-certs.sh
|
@ -33,19 +33,12 @@ fetch_cert() (
|
|||
response=$($timeout $torsocks openssl s_client -connect "$hp" </dev/null 2>/dev/null \
|
||||
| sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p')
|
||||
|
||||
# If no response, try again.
|
||||
if [ -z "$response" ]; then
|
||||
sleep 5
|
||||
response=$($timeout $torsocks openssl s_client -connect "$hp" </dev/null 2>/dev/null \
|
||||
| sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p')
|
||||
|
||||
# If still no response and Tor was not used, try one last time.
|
||||
# If no response and Tor was not used, try again.
|
||||
if [ -z "$response" ] && [ -z "$torsocks" ]; then
|
||||
sleep 10
|
||||
sleep 5
|
||||
response=$($timeout openssl s_client -connect "$hp" </dev/null 2>/dev/null \
|
||||
| sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p')
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "$response"
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue