Fix pihole -up showing FTL update when network is down

Fixes #1877

Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
This commit is contained in:
Mcat12 2019-06-28 20:49:56 -07:00 committed by Dan Schaper
parent 35cf863f4b
commit c9829dd3e4
No known key found for this signature in database
GPG key ID: B4FF14C01CC08DC0

View file

@ -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