diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index 65fb7c2e..5b81f691 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -2396,8 +2396,16 @@ FTLcheckUpdate() { if [[ ${ftlLoc} ]]; then local FTLversion FTLversion=$(/usr/bin/pihole-FTL tag) + local FTLreleaseData local FTLlatesttag - FTLlatesttag=$(curl -sI https://github.com/pi-hole/FTL/releases/latest | grep 'Location' | awk -F '/' '{print $NF}' | tr -d '\r\n') + + if ! FTLreleaseData=$(curl -sI https://github.com/pi-hole/FTL/releases/latest); then + # There was an issue while retrieving the latest version + printf " %b Failed to retrieve latest FTL release metadata" "${CROSS}" + return 3 + fi + + FTLlatesttag=$(grep 'Location' < "${FTLreleaseData}" | awk -F '/' '{print $NF}' | tr -d '\r\n') if [[ "${FTLversion}" != "${FTLlatesttag}" ]]; then return 0