mirror of
https://github.com/pi-hole/pi-hole.git
synced 2025-04-26 01:00:33 +00:00
Version remote check returns -1 on failure to detect curl silent failing. Update detects loss of contact to GitHub or fallthrough condition and reports to user.
This commit is contained in:
parent
3d43e1568c
commit
f7266ef4c8
2 changed files with 17 additions and 13 deletions
|
@ -58,10 +58,10 @@ coreOutput() {
|
|||
|
||||
if [[ "${latest}" == true && "${current}" == false ]]; then
|
||||
piholeVersionLatest=$(curl -s https://api.github.com/repos/pi-hole/pi-hole/releases/latest | grep -Po '"tag_name":.*?[^\\]",' | perl -pe 's/"tag_name": "//; s/^"//; s/",$//')
|
||||
echo ${piholeVersionLatest}
|
||||
echo ${piholeVersionLatest:-"-1"}
|
||||
elif [[ "${latest}" == false && "${current}" == true ]]; then
|
||||
piholeVersion=$(cd /etc/.pihole/ && git describe --tags --abbrev=0)
|
||||
echo ${piholeVersion}
|
||||
echo ${piholeVersion:-"-1"}
|
||||
else
|
||||
piholeVersion=$(cd /etc/.pihole/ && git describe --tags --abbrev=0)
|
||||
piholeVersionLatest=$(curl -s https://api.github.com/repos/pi-hole/pi-hole/releases/latest | grep -Po '"tag_name":.*?[^\\]",' | perl -pe 's/"tag_name": "//; s/^"//; s/",$//')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue