Skip to content

Commit

Permalink
Add retries to curl ifconfig.co (angristan#708)
Browse files Browse the repository at this point in the history
  • Loading branch information
angristan authored Dec 13, 2021
1 parent 6c4d91e commit 8f83781
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions openvpn-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -627,9 +627,9 @@ function installOpenVPN() {
# Behind NAT, we'll default to the publicly reachable IPv4/IPv6.
if [[ $IPV6_SUPPORT == "y" ]]; then
PUBLIC_IP=$(curl https://ifconfig.co)
PUBLIC_IP=$(curl --retry 5 --retry-connrefused https://ifconfig.co)
else
PUBLIC_IP=$(curl -4 https://ifconfig.co)
PUBLIC_IP=$(curl --retry 5 --retry-connrefused -4 https://ifconfig.co)
fi
ENDPOINT=${ENDPOINT:-$PUBLIC_IP}
fi
Expand Down

0 comments on commit 8f83781

Please sign in to comment.