Dan Schaper
398405c303
All gravity related files and dirs should be owned by pihole:pihole ( #6186 )
2025-05-12 08:48:27 -07:00
yubiuser
189da82614
&& chown
...
Co-authored-by: Dan Schaper <dan.schaper@pi-hole.net>
Signed-off-by: yubiuser <github@yubiuser.dev>
2025-05-12 08:54:58 +02:00
Dan Schaper
09368a77b4
Remove unused $target from gravity ( #6192 )
2025-05-03 13:37:45 -07:00
yubiuser
3bd6a41795
Improve wording
...
Co-authored-by: Adam Warner <me@adamwarner.co.uk>
Signed-off-by: yubiuser <github@yubiuser.dev>
2025-04-26 15:36:22 +02:00
Christian König
4303a5868f
Only append dot
...
Signed-off-by: Christian König <github@yubiuser.dev>
2025-04-26 15:03:42 +02:00
Christian König
215003899d
(2+1)*40
...
Signed-off-by: Christian König <github@yubiuser.dev>
2025-04-26 15:03:01 +02:00
Christian König
72a52807d1
Fix gravity waiting forever for DNS
...
Signed-off-by: Christian König <github@yubiuser.dev>
2025-04-25 21:03:09 +02:00
Christian König
d7b6d6aa33
Remove unused $target from gravity
...
Signed-off-by: Christian König <github@yubiuser.dev>
2025-04-22 23:06:01 +02:00
Christian König
4a1bcda6f1
All gravity related files and dirs should be owned by pihole:pihole
...
Signed-off-by: Christian König <github@yubiuser.dev>
2025-04-21 09:30:36 +02:00
Christian König
1432568d17
Remove duplicated code checking if adlist domain is blocked locally
...
Signed-off-by: Christian König <github@yubiuser.dev>
2025-04-20 20:14:41 +02:00
Adam Warner
48272f3393
revert a change to gravity.sh that attempted to fix an SC2086 warning from shellcheck.
...
Fixes #6159
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2025-04-09 18:02:40 +01:00
Christian König
ca1bab3c1b
Fix more shellcheck warnings
...
Signed-off-by: Christian König <github@yubiuser.dev>
2025-04-07 10:52:57 +02:00
Adam Warner
2088601148
Add .shellcheckrc to configure shellcheck ignore SC1090-1 globally
...
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2025-04-06 18:46:47 +01:00
Adam Warner
59d2177271
In ./advanced/Scripts/database_migration/gravity-db.sh line 18:
...
piholeDir="${2}"
^-------^ SC2034 (warning): piholeDir appears unused. Verify use (or export if used externally).
Turns out it is _actually_ unused, the full path of the gravity database is passed to the function, so we'll tidy this up rather than supressing.
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2025-04-06 14:11:40 +01:00
Dominik
5afab5e96c
Move list parsing entirely into FTL ( #6105 )
2025-04-05 20:15:16 +02:00
Adam Warner
2477d6b184
Revert #6137 ( #6146 )
2025-04-04 23:28:51 +01:00
yubiuser
65b42c1c8f
Ensure gravity_Cleanup() checks the correct directory ( #6131 )
2025-04-04 22:50:19 +02:00
Michael Woolweaver
e548ed043f
ensure gravity_Cleanup() checks the correct directory for list data
...
also glob with * to ensure .etag & .sha1 are removed as well
should fix #6075
Co-authored-by: yubiuser <github@yubiuser.dev>
Signed-off-by: Michael Woolweaver <michael@woolweaver.bid>
2025-04-04 15:15:51 -05:00
Adam Warner
4108c817dc
Revert "source with source not dot ( #6137 )"
...
This reverts commit 8fd2ebd3d7
, reversing
changes made to 557bc6f179
.
2025-04-04 19:12:57 +01:00
Michael Woolweaver
4efe4dfd4b
source with source not dot
...
Signed-off-by: Michael Woolweaver <michael@woolweaver.bid>
2025-04-02 14:21:45 -05:00
Michael Woolweaver
3cb6ea503a
build gravityDBfile_default
like the other variables
...
seems this one was forgotten
Signed-off-by: Michael Woolweaver <michael@woolweaver.bid>
2025-04-01 23:57:56 -05:00
DL6ER
dec670a6d6
Move list parsing entirely into FTL
...
Signed-off-by: DL6ER <dl6er@dl6er.de>
2025-03-22 09:18:02 +01:00
Michael Woolweaver
3a592471c6
revert pi-hole/pi-hole/pull/6030
...
in preparation for pi-hole/docker-pi-hole/pull/1786
Signed-off-by: Michael Woolweaver <michael@woolweaver.bid>
2025-03-14 14:32:29 -05:00
Adam Warner
edf336067a
Fix gravity.sh -- Alpine / Docker specific issue ( #6030 )
2025-03-03 17:44:45 +00:00
Dominik
df814ece91
Revert "Improve gravity on systems with low memory"
2025-03-03 09:00:17 +01:00
Karol Kania
9c7e02f213
Update gravity.sh
...
remove the left-over commented debug code
Signed-off-by: Karol Kania <44871508+karolkania@users.noreply.github.com>
2025-03-02 12:05:42 +01:00
Dominik
53e241f057
Improve gravity on systems with low memory ( #5977 )
2025-02-28 17:02:56 +01:00
Karol Kania
a9650ae287
Update gravity.sh
...
fix the `if statement` that doesn't seem to work for neither of alpine's ash / bash - applying some workaround with the `stat` command
Signed-off-by: Karol Kania <44871508+karolkania@users.noreply.github.com>
2025-02-28 12:52:07 +01:00
DL6ER
5da5d0d4c1
Use temp_store = FILE to avoid memory exhaustion on build the tree for very large databases
...
Signed-off-by: DL6ER <dl6er@dl6er.de>
2025-02-23 08:50:08 +01:00
Christian König
cd269cbca1
If there are no files to change, don't print an error
...
Signed-off-by: Christian König <github@yubiuser.dev>
2025-02-21 22:02:03 +01:00
DL6ER
1bebeff720
Add further info message that building the tree may have failed because of too little RAM baing available. We have see this a few times, either with way too many domains on devices like a Pi Zero or, e.g., only 256 MB RAM being allocated to VMs
...
Signed-off-by: DL6ER <dl6er@dl6er.de>
2025-02-09 10:06:24 +01:00
Dominik
9212a4a514
Decide if the content was changed *before* passing over to FTL ( #5872 )
2025-02-04 18:57:01 +01:00
Dominik
8e298df1e8
Show only enabled domains/regex in the final gravity message ( #5884 )
2025-02-03 20:37:49 +01:00
DL6ER
88cfda7210
Show only enabled domains/regex in the final gravity message
...
Signed-off-by: DL6ER <dl6er@dl6er.de>
2025-02-03 19:16:24 +01:00
Christian König
94e772378e
Merge branch 'development' into new/listsCacheDir
...
Signed-off-by: Christian König <github@yubiuser.dev>
2025-02-03 08:09:37 +01:00
Dominik
7dbf408c26
Gravity: Use ETags ( #5867 )
2025-02-03 06:30:11 +01:00
DL6ER
7162be18e2
Remove curl -V temp variable
...
Signed-off-by: DL6ER <dl6er@dl6er.de>
2025-02-02 20:57:13 +01:00
DL6ER
9da1e9ab88
Fix counting of domains at the end of pihole -g. The existing schme used the SQL VIEWs for simplicitly, however, they have the unintended side-effect of - when being queried without a GROUP BY clause - returning entries multiple times if they are assigned to several groups
...
Signed-off-by: DL6ER <dl6er@dl6er.de>
2025-02-01 19:42:25 +01:00
DL6ER
37718c65e9
Simplify cURL etag feature detection following discussion in #5873
...
Signed-off-by: DL6ER <dl6er@dl6er.de>
2025-02-01 19:36:56 +01:00
DL6ER
9faef22061
Decide if the content was changed *before* passing over to FTL
...
Signed-off-by: DL6ER <dl6er@dl6er.de>
2025-01-31 16:46:12 +01:00
DL6ER
bf899fa57f
Migrate list's files (lists themselves, their SHA1 sum and, later, their ETags) into a dedicated directory /etc/pihole/listsCache in an attempt to clean up /etc/pihole
...
Signed-off-by: DL6ER <dl6er@dl6er.de>
2025-01-30 06:12:49 +01:00
DL6ER
68b03e114c
Merge branch 'development' into new/etags
...
Signed-off-by: DL6ER <dl6er@dl6er.de>
2025-01-29 19:24:31 +01:00
DL6ER
f50c696253
Use temp variable for curl -V output
...
Signed-off-by: DL6ER <dl6er@dl6er.de>
2025-01-29 19:19:01 +01:00
DL6ER
6e0b16ed1a
Rename heisenbergCompensator -> modifiedOptions
...
Signed-off-by: DL6ER <dl6er@dl6er.de>
2025-01-29 19:17:04 +01:00
DL6ER
4322299c39
Drive-by fixing of errors reported by shellcheck for gravity.sh
...
Signed-off-by: DL6ER <dl6er@dl6er.de>
2025-01-29 17:53:33 +01:00
DL6ER
cee021c358
Use HTTP ETags in addition to the If-Modified-Since header if supported by curl to avoid downloading from servers not using the latter method (raw.githubcontent.com)
...
Signed-off-by: DL6ER <dl6er@dl6er.de>
2025-01-29 17:53:33 +01:00
DL6ER
c381109dcd
Use a different method to identify if a gravity restore succeeded
...
Signed-off-by: DL6ER <dl6er@dl6er.de>
2025-01-29 17:52:39 +01:00
DL6ER
69bfb3ff3b
Store timestamp of the backup creation instead of the filename on restoring gravity.db
...
Signed-off-by: DL6ER <dl6er@dl6er.de>
2025-01-26 19:52:46 +01:00
DL6ER
cc25ee940e
Fix unreachable code
...
Signed-off-by: DL6ER <dl6er@dl6er.de>
2025-01-12 13:42:51 +01:00
DL6ER
12927f8a3d
Put gravity backup files into dedicated directory for cleaness
...
Signed-off-by: DL6ER <dl6er@dl6er.de>
2025-01-12 13:41:27 +01:00