1
0
Fork 0
mirror of https://git.sr.ht/~seirdy/seirdy.one synced 2024-11-10 00:12:09 +00:00

Fix connectivity check for ipv4-only builds

This commit is contained in:
Rohan Kumar 2023-06-15 11:47:57 -07:00
parent 103532b3f9
commit e9a2af4a2b
No known key found for this signature in database
GPG key ID: 1E892DB2A5F84479
2 changed files with 18 additions and 4 deletions

View file

@ -28,8 +28,5 @@ tasks:
cd seirdy.one cd seirdy.one
export PATH=~/bin:$PATH export PATH=~/bin:$PATH
# quick health + ip check # quick health + ip check
curl -6 --proto "=https" --proto-default https --http2 -siSL --tlsv1.3 --cert-status 'seirdy.one/ip' sh scripts/connectivity-check.sh
echo
curl -4 --proto "=https" --proto-default https --http2 -sSL --tlsv1.3 --cert-status 'seirdy.one/ip'
echo
bmake deploy-prod deploy-onion bmake deploy-prod deploy-onion

View file

@ -0,0 +1,17 @@
#!/bin/sh
set -e -u
alias curl_cmd=curl --proto "=https" --proto-default https --http2 -siSL --tlsv1.3 --cert-status
ipv6_success=1
ipv4_success=1
curl_cmd -6 'seirdy.one/ip' || ipv6_success=0
echo
curl_cmd -4 'seirdy.one/ip' || ipv4_success=0
echo
if [ "$ipv6_success" = 0 ] && [ "$ipv4_success" = 0 ]; then
echo "Failed to connect"
exit 1
fi