1
0
mirror of https://github.com/pi-hole/pi-hole.git synced 2025-09-20 17:11:17 +08:00

633 Commits

Author SHA1 Message Date
a2dd0e2f50 Prevent gravity curl from using unset bash variable's empty string. (#6191) 2025-07-10 11:29:00 -07:00
a48665c7bb Remove deprecated and unused colors
Signed-off-by: Christian König <github@yubiuser.dev>
2025-06-24 18:51:01 +02:00
6ba6b0f015 Return 1 only if resolution fails
Function gravity_CheckDNSResolutionAvailable() should return 0 if DNS resolution is available

Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
2025-05-20 19:46:28 -03:00
398405c303 All gravity related files and dirs should be owned by pihole:pihole (#6186) 2025-05-12 08:48:27 -07:00
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
95d27ac985 Merge branch 'development' into tweak/gravity_options
Signed-off-by: Christian König <github@yubiuser.dev>
2025-05-04 14:17:41 +02:00
09368a77b4 Remove unused $target from gravity (#6192) 2025-05-03 13:37:45 -07:00
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
4303a5868f Only append dot
Signed-off-by: Christian König <github@yubiuser.dev>
2025-04-26 15:03:42 +02:00
215003899d (2+1)*40
Signed-off-by: Christian König <github@yubiuser.dev>
2025-04-26 15:03:01 +02:00
72a52807d1 Fix gravity waiting forever for DNS
Signed-off-by: Christian König <github@yubiuser.dev>
2025-04-25 21:03:09 +02:00
d7b6d6aa33 Remove unused $target from gravity
Signed-off-by: Christian König <github@yubiuser.dev>
2025-04-22 23:06:01 +02:00
7a641f4c35 Use paramteter expansion to prevent adding literal '' if parameter is empty
Signed-off-by: Christian König <github@yubiuser.dev>
2025-04-22 22:52:33 +02:00
13d76abff7 Set customUpstreamResolver empty
Signed-off-by: Christian König <github@yubiuser.dev>
2025-04-22 22:38:07 +02:00
76e41aeefa Add small note about modifiedOptions
Signed-off-by: Christian König <github@yubiuser.dev>
2025-04-22 22:03:54 +02:00
774037834b Rename cmd_ext
Signed-off-by: Christian König <github@yubiuser.dev>
2025-04-22 22:01:21 +02:00
89c4248315 Use quotes for all substitutions
Signed-off-by: Christian König <github@yubiuser.dev>
2025-04-22 21:57:47 +02:00
6fc5bf83f4 don't mute SC2086
Signed-off-by: Michael Woolweaver <michael@woolweaver.bid>
2025-04-22 21:56:21 +02:00
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
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
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
ca1bab3c1b Fix more shellcheck warnings
Signed-off-by: Christian König <github@yubiuser.dev>
2025-04-07 10:52:57 +02:00
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
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
5afab5e96c Move list parsing entirely into FTL (#6105) 2025-04-05 20:15:16 +02:00
2477d6b184 Revert #6137 (#6146) 2025-04-04 23:28:51 +01:00
65b42c1c8f Ensure gravity_Cleanup() checks the correct directory (#6131) 2025-04-04 22:50:19 +02:00
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
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
4efe4dfd4b source with source not dot
Signed-off-by: Michael Woolweaver <michael@woolweaver.bid>
2025-04-02 14:21:45 -05:00
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
dec670a6d6 Move list parsing entirely into FTL
Signed-off-by: DL6ER <dl6er@dl6er.de>
2025-03-22 09:18:02 +01:00
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
edf336067a Fix gravity.sh -- Alpine / Docker specific issue (#6030) 2025-03-03 17:44:45 +00:00
df814ece91 Revert "Improve gravity on systems with low memory" 2025-03-03 09:00:17 +01:00
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
53e241f057 Improve gravity on systems with low memory (#5977) 2025-02-28 17:02:56 +01:00
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
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
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
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
9212a4a514 Decide if the content was changed *before* passing over to FTL (#5872) 2025-02-04 18:57:01 +01:00
8e298df1e8 Show only enabled domains/regex in the final gravity message (#5884) 2025-02-03 20:37:49 +01:00
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
94e772378e Merge branch 'development' into new/listsCacheDir
Signed-off-by: Christian König <github@yubiuser.dev>
2025-02-03 08:09:37 +01:00
7dbf408c26 Gravity: Use ETags (#5867) 2025-02-03 06:30:11 +01:00
7162be18e2 Remove curl -V temp variable
Signed-off-by: DL6ER <dl6er@dl6er.de>
2025-02-02 20:57:13 +01:00
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
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
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