Skip to content

Conversation

mwoolweaver
Copy link
Contributor

@mwoolweaver mwoolweaver commented Apr 1, 2025

What does this PR aim to accomplish?:

ensure gravity_Cleanup() checks the correct directory (listsCacheDir) for list data when it's Cleaning up stray matter.

How does this PR accomplish the above?:

changes

for file in "${piholeDir}"/*."${domainsExtension}"; do

to check listsCacheDir instead of piholeDir for list data as the location was changed in #5869

also glob (*) here

rm -f "${file}" 2>/dev/null ||

with "${file}"* to remove .etag & .sha1 as well.

should fix #6075

Link documentation PRs if any are needed to support this PR:


By submitting this pull request, I confirm the following:

  1. I have read and understood the contributors guide, as well as this entire template. I understand which branch to base my commits and Pull Requests against.
  2. I have commented my proposed changes within the code and I have tested my changes.
  3. I am willing to help maintain this change if there are issues with it later.
  4. It is compatible with the EUPL 1.2 license
  5. I have squashed any insignificant commits. (git rebase)
  6. I have checked that another pull request for this purpose does not exist.
  7. I have considered, and confirmed that this submission will be valuable to others.
  8. I accept that this submission may not be used, and the pull request closed at the will of the maintainer.
  9. I give this submission freely, and claim no ownership to its content.

  • [✔] I have read the above and my PR is ready for review. Check this box to confirm

@mwoolweaver mwoolweaver force-pushed the patch-4 branch 3 times, most recently from 794dc61 to 52f469b Compare April 1, 2025 04:48
@mwoolweaver mwoolweaver changed the title ensure gravity_Cleanup() checks the correct directory for list data (listsCacheDir instead of piholeDir) ensure gravity_Cleanup() checks the correct directory for list data (listsCacheDir instead of piholeDir). Also golb with * to get .etag and .sha1 Apr 1, 2025
@mwoolweaver mwoolweaver changed the title ensure gravity_Cleanup() checks the correct directory for list data (listsCacheDir instead of piholeDir). Also golb with * to get .etag and .sha1 ensure gravity_Cleanup() checks the correct directory for list data (listsCacheDir instead of piholeDir). Also glob with * to get .etag and .sha1 Apr 1, 2025
@mwoolweaver mwoolweaver changed the title ensure gravity_Cleanup() checks the correct directory for list data (listsCacheDir instead of piholeDir). Also glob with * to get .etag and .sha1 ensure gravity_Cleanup() checks the correct directory for list data (listsCacheDir instead of piholeDir). Also glob with * to remove .etag and .sha1 as well. Apr 1, 2025
@mwoolweaver mwoolweaver changed the title ensure gravity_Cleanup() checks the correct directory for list data (listsCacheDir instead of piholeDir). Also glob with * to remove .etag and .sha1 as well. ensure gravity_Cleanup() checks the correct directory for list data (listsCacheDir instead of piholeDir). Glob with * to remove .etag and .sha1 as well. Apr 1, 2025
Copy link
Member

@yubiuser yubiuser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your PR.
We try to get rid of the "funny" names to make the complex script more readable. Could you please change the other occurrence of gravity_Blackbody as well

@yubiuser yubiuser changed the title ensure gravity_Cleanup() checks the correct directory for list data (listsCacheDir instead of piholeDir). Glob with * to remove .etag and .sha1 as well. Ensure gravity_Cleanup() checks the correct directory Apr 4, 2025
also glob with * to ensure .etag & .sha1 are removed as well
should fix pi-hole#6075

Co-authored-by: yubiuser <github@yubiuser.dev>
Signed-off-by: Michael Woolweaver <michael@woolweaver.bid>
@yubiuser yubiuser merged commit 65b42c1 into pi-hole:development Apr 4, 2025
14 checks passed
@mwoolweaver mwoolweaver deleted the patch-4 branch April 4, 2025 21:11
@PromoFaux PromoFaux mentioned this pull request May 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

When adlist is removed from gravity the corresponding list data is not removed from /etc/pihole/listsCache/
2 participants