1
0
Fork 0
mirror of https://git.sr.ht/~seirdy/seirdy.one synced 2024-12-17 22:32:10 +00:00
seirdy.one/scripts/connectivity-check.sh
2023-06-15 11:49:18 -07:00

17 lines
352 B
Bash

#!/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