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
parent 06134d3ffc
commit 91a2d052a7
No known key found for this signature in database
GPG Key ID: ABB8FC9789AF524D
1 changed files with 5 additions and 0 deletions

View File

@ -2402,6 +2402,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