pi-hole / PADD

PADD (formerly Chronometer2) is a more expansive version of the original chronometer.sh that is included with Pi-Hole. PADD provides in-depth information about your Pi-hole.
1.36k stars 122 forks source link

v3.2.1 running, yet says Updates are available ? #87

Closed fireheadman closed 4 years ago

fireheadman commented 4 years ago

Unsure if PADD is not recognizing the latest version is installed? I just updated pihole (sudo pihole -up) and padd.sh

image

fireheadman commented 4 years ago

Solution: sudo vi padd.sh

CHANGE "Location" to "location" in line 493 image

image

...and now: image

danozdotnet commented 4 years ago

https://github.com/jpmck/PADD/issues/73

mikegee81 commented 4 years ago

The workaround of removing the pihole version did not work for me. But, this is fixed by the change in pull request in #82

peatrick commented 4 years ago

Kept getting frustrated, not understanding what I was doing wrong, despite multiple updates -- many thanks, @fireheadman your simple change of "Location" to "location" worked perfectly: Capture and now I don't have to keep banging my head against the wall needlessly. Only difference, I'm a plebe and use Nano, instead of VIM/VI. Don't hate me.

EDIT: The above screen capture is on a friend's network, but all of my Piholes (x3) updated perfectly using the same process, making adjustments to case-sensitivity ("L" to "l" on line 493). Thanks again!

p1r473 commented 4 years ago

I am getting the same issue

peatrick commented 4 years ago

I am getting the same issue

Did you have any issues making the change above? Pretty straightforward, just adjust the case sensitivity -- hope that helps resolve your issues, as well. Fixed it on 3 different Piholes for me, across both baremetal RPi, VMware Debian VM & VirtualBox Ubuntu Server VM.

damienmci commented 4 years ago

Had the same issue. Made the change and all fixed.

snarkbe commented 4 years ago

I put a "grep -i" to solve the issue.

Now sure when "location" or "Location" is returned, but the "-i" (case insensitive) will cover for both.

fireheadman commented 4 years ago

UPDATE: I'm now on the latest version (again)... and back to this issue image

3.2.1 is the latest out, but padd.sh thinks otherwise. I see that Location is now location, so something else is causing this? image

fireheadman commented 4 years ago

Looks like something with how github changed urls? From the padd.sh (version check block)

# PADD version information...
    padd_version_latest=$(curl -sI https://github.com/jpmck/PADD/releases/latest | awk -F / 'tolower($0) ~ /^location:/ {print $NF; exit}' | tr -d '\r\n[:alpha:]')

So running this.... shows the 301 Moved Permanently

pi@pihole01:/etc/pihole/scripts$ curl -sI https://github.com/jpmck/PADD/releases/latest
HTTP/1.1 301 Moved Permanently
server: GitHub.com
date: Fri, 10 Jul 2020 18:41:57 GMT
content-type: text/html; charset=utf-8
status: 301 Moved Permanently
vary: X-PJAX, Accept-Encoding, Accept, X-Requested-With
location: https://github.com/pi-hole/PADD/releases/latest
cache-control: no-cache
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: origin-when-cross-origin, strict-origin-when-cross-origin
expect-ct: max-age=2592000, report-uri="https://api.github.com/_private/browser/errors"
content-security-policy: default-src 'none'; base-uri 'self'; block-all-mixed-content; connect-src 'self' uploads.github.com www.githubstatus.com collector.githubapp.com api.github.com www.google-analytics.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com cdn.optimizely.com logx.optimizely.com/v1/events wss://live.github.com wss://alive.github.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com; frame-ancestors 'none'; frame-src render.githubusercontent.com; img-src 'self' data: github.githubassets.com identicons.github.com collector.githubapp.com github-cloud.s3.amazonaws.com *.githubusercontent.com; manifest-src 'self'; media-src 'none'; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; worker-src github.com/socket-worker.js gist.github.com/socket-worker.js
Set-Cookie: _gh_sess=DaUPuNyBhMI3MUrKDUC4n2ibv1fLE2FKdAUCiCllkcYm7sD4WLj%2FXIe3zqkdkzOpMN0nLyRgY25yxgK71AsegfyBrD0D2Me0G3wpy9PzFFSlZwGkil6Jwe%2BBnW21bir2nJseVAq1Nlx6NmWSZ4Zk9LEIujiuYCfz%2F3GuVAj4%2Bqp1IcX8eB%2BKA0%2FnhqIBqp1eKa57FkrC6%2FhsHAu9mAlH9YJ5c%2FEemaUcxzl32g8Wgn9u8JLclriKJiBmvwEkvE%2BBTbvya3mHPBHMxufzLv2pDQ%3D%3D--cJga1ecKAOUl3eyK--xjmnrv%2FLkOTMNYCMKR5OJw%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
Set-Cookie: _octo=GH1.1.695771364.1594406517; Path=/; Domain=github.com; Expires=Sat, 10 Jul 2021 18:41:57 GMT; Secure; SameSite=Lax
Set-Cookie: logged_in=no; Path=/; Domain=github.com; Expires=Sat, 10 Jul 2021 18:41:57 GMT; HttpOnly; Secure; SameSite=Lax
Content-Length: 113
X-GitHub-Request-Id: EDD9:4551:26D66:4B978:5F08B675

Solution: Need to update the Version string once more to this: (edit the padd.sh, line 493)

# PADD version information...
#padd_version_latest=$(curl -sI https://github.com/jpmck/PADD/releases/latest | awk -F / 'tolower($0) ~ /^location:/ {print $NF; exit}' | tr -d '\r\n[:alpha:]')
padd_version_latest=$(curl -sI https://github.com/pi-hole/PADD/releases/latest | awk -F / 'tolower($0) ~ /^location:/ {print $NF; exit}' | tr -d '\r\n[:alpha:]')

Verifying the new URL works

pi@pihole01:/etc/pihole/scripts$ curl -sI https://github.com/pi-hole/PADD/releases/latest
HTTP/1.1 302 Found
server: GitHub.com
date: Fri, 10 Jul 2020 18:44:55 GMT
content-type: text/html; charset=utf-8
status: 302 Found
vary: X-PJAX, Accept-Encoding, Accept, X-Requested-With
location: https://github.com/pi-hole/PADD/releases/tag/v3.2.1
cache-control: no-cache
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
expect-ct: max-age=2592000, report-uri="https://api.github.com/_private/browser/errors"
content-security-policy: default-src 'none'; base-uri 'self'; block-all-mixed-content; connect-src 'self' uploads.github.com www.githubstatus.com collector.githubapp.com api.github.com www.google-analytics.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com cdn.optimizely.com logx.optimizely.com/v1/events wss://live.github.com wss://alive.github.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com; frame-ancestors 'none'; frame-src render.githubusercontent.com; img-src 'self' data: github.githubassets.com identicons.github.com collector.githubapp.com github-cloud.s3.amazonaws.com *.githubusercontent.com; manifest-src 'self'; media-src 'none'; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; worker-src github.com/socket-worker.js gist.github.com/socket-worker.js
Set-Cookie: _gh_sess=kNj%2Bt1biFkpZplYa4bldNb0BD4TRM0kRVkTDik3Ss%2FoTtCE3rPS%2BWAGU7ZTiojxVLDeDKlJJHH59Ki5Q6zdlGebdC%2Bie6VgGLxmas9w2vS4aANbad01J81tRjfp21ExYElNrEFv7FQLu26%2FImDUM9M2nD%2FS36zXpJ30CGb8JidnNYQXVevc0TEnrg%2B9qYUpknSkK7MydSn2cSiNT%2F%2BHytHwvr%2Bc%2FqpJnD2DmNYeu4BzS%2BEXt%2BLLRY4CT%2BiGdR8Y0XqGd22Dkvk2G%2FWu2hs%2B3jg%3D%3D--%2FW5zZ63SQvfBn6LD--OaqPgKq7gO0dJVrAYvunrw%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
Set-Cookie: _octo=GH1.1.818824093.1594406695; Path=/; Domain=github.com; Expires=Sat, 10 Jul 2021 18:44:55 GMT; Secure; SameSite=Lax
Set-Cookie: logged_in=no; Path=/; Domain=github.com; Expires=Sat, 10 Jul 2021 18:44:55 GMT; HttpOnly; Secure; SameSite=Lax
Content-Length: 117
X-GitHub-Request-Id: 9826:2EFB:505D2:909FD:5F08B727

Shows correct version now...

pi@pihole01:/etc/pihole/scripts$](url) curl -sI https://github.com/pi-hole/PADD/releases/latest | awk -F / 'tolower($0) ~ /^location:/ {print $NF; exit}'
v3.2.1

And lastly... padd.sh is happy again. image

snarkbe commented 4 years ago

I have opened issue #110 about this issue and how to solve it.