mirror of
https://git.sr.ht/~seirdy/seirdy.one
synced 2024-11-23 21:02:09 +00:00
Fix connectivity check for ipv4-only builds
This commit is contained in:
parent
103532b3f9
commit
e9a2af4a2b
2 changed files with 18 additions and 4 deletions
|
@ -28,8 +28,5 @@ tasks:
|
|||
cd seirdy.one
|
||||
export PATH=~/bin:$PATH
|
||||
# quick health + ip check
|
||||
curl -6 --proto "=https" --proto-default https --http2 -siSL --tlsv1.3 --cert-status 'seirdy.one/ip'
|
||||
echo
|
||||
curl -4 --proto "=https" --proto-default https --http2 -sSL --tlsv1.3 --cert-status 'seirdy.one/ip'
|
||||
echo
|
||||
sh scripts/connectivity-check.sh
|
||||
bmake deploy-prod deploy-onion
|
||||
|
|
17
scripts/connectivity-check.sh
Normal file
17
scripts/connectivity-check.sh
Normal 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
|
Loading…
Reference in a new issue