Commit Graph

6601 Commits

Author SHA1 Message Date
MichaIng 8e706e4a16
Assure that Lighttpd conf-enabled symlink is removed
`/etc/lighttpd/conf-enabled` usually contains symlinks to the actual files in `/etc/lighttpd/conf-available`, at least `lighty-enable-mod` does exactly this. If `/etc/lighttpd/conf-available/15-pihole-admin.conf` is removed first, `/etc/lighttpd/conf-enabled/15-pihole-admin.conf` hence points to nowhere, which makes the `-f` check return false. The orphaned symlink is hence not removed, if `lighty-disable-mod` is not available.

This PR changes the order, to remove the symlink first, and to be failsafe also if it is orphaned already, and the actual config afterwards.

Signed-off-by: MichaIng <micha@dietpi.com>
2025-02-22 23:27:05 +01:00
Adam Warner 667a25574a
Fix dnsmasq v5 to v6 config migration (#5968) 2025-02-22 21:33:02 +00:00
MichaIng 8f5296536e
Fix dnsmasq v5 to v6 config migration
The dnsmasq config files were removed in `remove_old_dnsmasq_ftl_configs()`, before they were tried to be migrated via `migrate_dnsmasq_configs()`, and hence most settings were lost during v5 to v6 update.

This commit renames and adjussts `remove_old_dnsmasq_ftl_configs()` to move dnsmasq config files into the migration directory instead, to be picked up by `migrate_dnsmasq_configs()` later.

Signed-off-by: MichaIng <micha@dietpi.com>
2025-02-22 21:43:49 +01:00
Adam Warner da4048ba5d
Only run migration code if setupVars.conf exists. (#5969) 2025-02-22 20:30:46 +00:00
Adam Warner 1764f99333
decide migration based on existence of setupVars rather than pihole.toml
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2025-02-22 15:35:05 +00:00
yubiuser 5d5bddc979
Don't set a random password on v5 -> v6 updates (#5960) 2025-02-22 11:21:17 +01:00
Christian König bd3a0f4891
Don't set a random password on v5 -> v6 updates
Signed-off-by: Christian König <github@yubiuser.dev>
2025-02-22 07:16:28 +01:00
Adam Warner 8290e414ce
Sync master back into development (#5944) 2025-02-20 23:23:31 +00:00
Adam Warner 0e6d9e74d9
Pi-hole Core v6.0.2 (#5939) 2025-02-20 23:07:13 +00:00
Adam Warner f38332409f
Fix empty password detection (#5935) 2025-02-20 22:43:52 +00:00
MichaIng cd4efc3141
Fix empty password detection
The CLI skips double quotes in config output, hence the output is completely empty, if no password was applied yet, e.g. on a fresh install. This leads to an unprotected web interface. The check is corrected, to have a random password applied as intended.

Additionally, the logic to show an unchanged or unset password on the completion dialog is inverted to correctly show "unchanged" resp. "NOT SET" if the password has not been changed resp. is empty.

Signed-off-by: MichaIng <micha@dietpi.com>
2025-02-20 19:12:59 +01:00
Adam Warner 99bd142dd5
Apply chosen upstream DNS on fresh install (#5938) 2025-02-20 17:59:37 +00:00
MichaIng 49bb6dc0da
Apply chosen upstream DNS on fresh install
While the dialog is shown to choose or enter an upstream DNS for Pi-hole, it is never applied. Hence fresh Pi-hole installs have no upstream DNS and cannot resolve queries.

It is now checked for the two generated variables PIHOLE_DNS_1 and PIHOLE_DNS_2, a TOML array generated and applied via pihole-FTL CLI.

Signed-off-by: MichaIng <micha@dietpi.com>
2025-02-20 18:28:38 +01:00
Dominik 6f82ec5121
Sync master back into development (#5913) 2025-02-19 17:30:40 +01:00
Dominik 9de976cbbd
Pi-hole Core 6.0.1 (#5912) 2025-02-19 17:17:57 +01:00
yubiuser 0890f67322
Fix i386 fallback download (#5903) 2025-02-19 10:12:29 +01:00
DL6ER f7403e2ee6
Fix binary name in 32 bit x86 fallback case
Signed-off-by: DL6ER <dl6er@dl6er.de>
2025-02-19 08:42:32 +01:00
Dominik 51a9412c4b
Sync master back into development (#5892) 2025-02-18 19:22:47 +01:00
Adam Warner 2d81552f9f
Pi-hole core v6.0.0 (#5842) 2025-02-18 17:19:41 +00:00
yubiuser 2faad0b60a
Fix database integrity check in debug log (#5889) 2025-02-14 07:41:07 +01:00
Christian König c9e58adc48
DHCP discover timeout was reduced by FTL
Signed-off-by: Christian König <github@yubiuser.dev>
2025-02-10 20:41:18 +01:00
Christian König d1639740d9
Fix database integrity check in debug log
Signed-off-by: Christian König <github@yubiuser.dev>
2025-02-10 20:29:05 +01:00
Dominik abb94cafe4
Amend warning on gravity tree build failure (#5888) 2025-02-09 19:07:57 +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
yubiuser 9d53ad7668
installer: use a drop-in to disable systemd-resolved stub listener (#5885) 2025-02-06 18:47:49 +01:00
Nick Rosbrook 8fb3ccc147
installer: use a drop-in to disable systemd-resolved stub listener
systemd-resolved supports drop-in config snippets, e.g. by placing .conf
files in /etc/systemd/resolved.conf.d. During install, use a drop-in
config to set DNSStubListener=no, instead of modifying the main config.

This is generally better practice, and also prevents conflicts when
distribution packages are upgraded, which may include new versions of
/etc/systemd/resolved.conf.

Signed-off-by: Nick Rosbrook <enr0n@ubuntu.com>
2025-02-04 16:18:04 -05:00
Dominik 9212a4a514
Decide if the content was changed *before* passing over to FTL (#5872) 2025-02-04 18:57:01 +01:00
Adam Warner 2ae78e02bd
Add call to os_check in the update script (#5845) 2025-02-04 17:35:15 +00:00
yubiuser 330698878a
Remove outdated dns-servers.conf (#5883) 2025-02-04 06:19:07 +01:00
Dominik 8e298df1e8
Show only enabled domains/regex in the final gravity message (#5884) 2025-02-03 20:37:49 +01:00
Dominik 894a9e157f
Move gravity list cache into dedicated directory (#5869) 2025-02-03 20:35:38 +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 0da97e762f
Remove outdated dns-servers.conf
Signed-off-by: Christian König <github@yubiuser.dev>
2025-02-03 08:31:33 +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
Dominik ec805f9543
Fix counting of domains in the gravity summary (#5881) 2025-02-02 21:07:52 +01:00
DL6ER 7162be18e2
Remove curl -V temp variable
Signed-off-by: DL6ER <dl6er@dl6er.de>
2025-02-02 20:57:13 +01:00
yubiuser 9cd32bf2b7
Bump actions/setup-python from 5.3.0 to 5.4.0 (#5878) 2025-02-02 13:34:16 +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
dependabot[bot] aadea31e52
Bump actions/setup-python from 5.3.0 to 5.4.0
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5.3.0 to 5.4.0.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v5.3.0...v5.4.0)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-01 10:14:46 +00: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
Dominik e682f69a1d
Use a different method to identify if a gravity restore succeeded (#5868) 2025-01-29 19:23:40 +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