1
0
Fork 0
mirror of https://git.sr.ht/~seirdy/seirdy.one synced 2024-11-14 09:42:09 +00:00
seirdy.one/scripts/connectivity-check.sh

18 lines
352 B
Bash
Raw Normal View History

#!/bin/sh
set -e -u
2023-06-15 18:49:18 +00:00
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