Fix pihole -up showing FTL update when network is down

Fixes #1877

Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
pull/2873/head^2
Mcat12 5 years ago committed by Dan Schaper
parent 35cf863f4b
commit c9829dd3e4
No known key found for this signature in database
GPG Key ID: B4FF14C01CC08DC0

@ -2386,6 +2386,11 @@ FTLcheckUpdate() {
local FTLlatesttag
FTLlatesttag=$(curl -sI https://github.com/pi-hole/FTL/releases/latest | grep 'Location' | awk -F '/' '{print $NF}' | tr -d '\r\n')
if [[ $? != 0 ]]; then
# There was an issue while retrieving the latest version
return 3
fi
if [[ "${FTLversion}" != "${FTLlatesttag}" ]]; then
return 0
else

Loading…
Cancel
Save