diff --git a/server-side/step2_as_user_without_sudo.sh b/server-side/step2_as_user_without_sudo.sh index 21a257f..2266101 100644 --- a/server-side/step2_as_user_without_sudo.sh +++ b/server-side/step2_as_user_without_sudo.sh @@ -4,22 +4,20 @@ ############################################################################ # # -# Generate server-side SSH keys as the Linux user # +# Check for IPv6 # # # ############################################################################ -URL="https://loopsofzen.uk" -VARIABLE_A="output.txt" -STRING_TO_TEST="Loops of Zen" +# Check for assigned IPv6 addresses +ipv6_addresses=$(ip -6 addr show | grep -oP 'inet6 \K[0-9a-fA-F:]{1,}') -# Curl to get the page -curl -o "$VARIABLE_A" "$URL" - -# Check if the first line contains the $THIS string -FIRST_LINE=$(head -n 1 "$VARIABLE_A") -if [ "$FIRST_LINE" = "$STRING_TO_TEST" ]; then +if [[ -n "$ipv6_addresses" ]]; then + echo "IPv6 is enabled. Addresses:" + echo "$ipv6_addresses" IPV6_TEST_RESULT="IPv6 Enabled" else + echo "IPv6 is not enabled." IPV6_TEST_RESULT="IPv6 not detected. IPv4 Only" + fi ############################################################################ # #