1
0
mirror of https://github.com/pi-hole/pi-hole synced 2025-08-04 13:25:24 +00:00
Commit Graph

2117 Commits

Author SHA1 Message Date
MichaIng
ad6a48b219
Add comment about TLS-related file permissions
Co-authored-by: Dominik <DL6ER@users.noreply.github.com>
Signed-off-by: MichaIng <micha@dietpi.com>
2025-02-26 20:59:32 +01:00
MichaIng
83a38bb71d
Add comment about file permissions
Co-authored-by: Dominik <DL6ER@users.noreply.github.com>
Signed-off-by: MichaIng <micha@dietpi.com>
2025-02-26 12:26:50 +01:00
MichaIng
232d581916
Re-add comment about execute bit on directory
Co-authored-by: Dominik <DL6ER@users.noreply.github.com>
Signed-off-by: MichaIng <micha@dietpi.com>
2025-02-26 12:25:51 +01:00
MichaIng
0b380d671d
Follow symlinks with find
Incorporating https://github.com/pi-hole/pi-hole/pull/5997

Signed-off-by: MichaIng <micha@dietpi.com>
2025-02-24 17:37:01 +01:00
MichaIng
e70981d80f
Do not overwrite TLS cert/key mode
FTL correctly creates the cert and especially private key with 0600 mode. But the prestart scripts changes it to 0660.

After removing the dedicated webserver from Pi-hole setups, the pihole group has no purpose anymore, and files should not be writable to any other user than pihole itself, and the private TLS key not reasable to anyone else either.

Additionally, this commit consolidates the chmod calls, applying 0755 to all directories and 0640 to all files, but the TLS key and cert.

Signed-off-by: MichaIng <micha@dietpi.com>
2025-02-24 17:29:58 +01:00
Christian König
b59ab5852a
Add missing trailing / when setting permissions of /etc/pihole
Signed-off-by: Christian König <github@yubiuser.dev>
2025-02-24 15:59:11 +01:00
Christian König
cadee26dba
Improve dig error handlin in api.sh
Signed-off-by: Christian König <github@yubiuser.dev>
2025-02-22 13:48:55 +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
Christian König
49cf5bb221
Remove 'reconfigure' option
Signed-off-by: Christian König <github@yubiuser.dev>
2025-02-06 21:57:05 +01:00
Adam Warner
2ae78e02bd
Add call to os_check in the update script (#5845) 2025-02-04 17:35:15 +00:00
DL6ER
6d4d35e848
Merge branch 'development' into tweak/gravity_backup 2025-01-26 19:53:06 +01:00
RD WebDesign
254b67bca3
Using more user-friendly messages on git describe failure
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
2025-01-13 20:11:41 -03:00
RD WebDesign
0ae50eab87
Suppress error message on git describe failure
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
2025-01-12 20:25:32 -03:00
RD WebDesign
27fb2bbe3a
Replace some hardcoded paths with pihole.toml values
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
2025-01-09 19:11:22 -03:00
RD WebDesign
c78be8a89d
No systemctl or service inside containers
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
2025-01-09 19:11:22 -03:00
RD WebDesign
0590bbba2d
Skip some checks in docker container
These commands always fail in containers with "command not found" (as expected).

Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
2025-01-09 19:11:21 -03:00
RD WebDesign
733dce1c4c
If it's a docker container, consider the OS is supported
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
2025-01-09 19:11:15 -03:00
RD WebDesign
bd9cc7cbb7
Clean up unused WEBCALL code
Debug Log is no longer available via web interface

Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
2025-01-09 17:15:12 -03:00
DL6ER
fab1ca3a40
Merge branch 'development' into tweak/gravity_backup 2025-01-01 18:46:33 +01:00
Adam Warner
bd9cb00574
Perform os_check during update, in case the user has updated to an unsupported OS between Pi-hole updates.
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2024-12-31 15:31:04 +00:00
Christian König
3011d48b6f
Use tail instead of parameter expansion
Signed-off-by: Christian König <github@yubiuser.dev>
2024-12-22 23:44:31 +01:00
Christian König
c777152c04
Only separat data and status when needed
Signed-off-by: Christian König <github@yubiuser.dev>
2024-12-22 21:57:47 +01:00
Dominik
4dbf9a0bbb
Install dependencies by creating a meta package on-the-fly (#5785) 2024-12-14 08:33:15 +01:00
Christian König
c380c23592
Merge branch 'development' into packages 2024-12-11 18:34:34 +01:00
Adam Warner
764aa48c14
Remove no-longer-needed utils
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2024-12-11 17:22:49 +00:00
DL6ER
11e00e04b5
Fix ARP flush command
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-12-07 11:22:58 +01:00
DL6ER
579dc07046
Merge branch 'development' into tweak/gravity_backup
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-11-26 21:08:09 +01:00
DL6ER
633c971a44
Store failed gravity restoration status in message table
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-11-23 09:44:39 +01:00
Christian König
4137275f24
Merge branch 'development' into packages
Signed-off-by: Christian König <github@yubiuser.dev>
2024-11-17 21:13:16 +01:00
DL6ER
2dc5bd15cc
Remove remaining traces of audit log
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-11-16 09:45:53 +01:00
Christian König
fd5b3be03f
Create meta package on the fly ... Debian
Signed-off-by: Christian König <github@yubiuser.dev>
2024-11-06 20:11:56 +01:00
Christian König
8bf6480aed
Set exit code explicitly everywhere
Signed-off-by: Christian König <github@yubiuser.dev>
2024-10-20 09:36:28 +02:00
Christian König
7ae0b207fc
Exit 1 if update script failed
Signed-off-by: Christian König <github@yubiuser.dev>
2024-10-20 09:34:15 +02:00
yubiuser
fa194e0a0c
Do not print FTL update check details on pihole -up (#5800) 2024-10-19 14:39:24 +02:00
Christian König
2fd51bd244
Fix gavity version 19
Signed-off-by: Christian König <github@yubiuser.dev>
2024-10-18 23:00:31 +02:00
Christian König
1ad135ad69
Do not print FTL update check details on pihole -up
Signed-off-by: Christian König <github@yubiuser.dev>
2024-10-18 22:30:22 +02:00
Adam Warner
7dd2eb20a2
Remove the restartdns functionality and promote the reloaddns functions (#5780) 2024-10-02 21:27:08 +01:00
Adam Warner
be00f3e723
Rename reloaddns-lists to reloadlists per suggestion
Co-authored-by: RD WebDesign <github@rdwebdesign.com.br>
Signed-off-by: Adam Warner <github@adamwarner.co.uk>
2024-10-02 19:39:34 +01:00
Christian König
bcc3a7e35e
Show version information after an web only update
Signed-off-by: Christian König <github@yubiuser.dev>
2024-09-30 21:04:55 +02:00
Adam Warner
cc476a49fe
remove the restartdns functionality and promote the reloaddns functions
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2024-09-24 14:15:15 +01:00
DL6ER
d60ad57cac
Add /etc/pihole/dnsmasq.conf to debug log (stripped-down version)
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-09-09 21:37:34 +02:00
Christian König
333764a7c1
Account for renaming of devel branch on web repo
Signed-off-by: Christian König <github@yubiuser.dev>
2024-09-04 21:59:43 +02:00
DL6ER
b4444023a2 Wait after restarting FTL before trying to check version
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-09-02 15:54:27 +02:00
Dominik
e3fc5cc8f2
Make the help text of "pihole checkout [what] [branch]" more colorful (#5734) 2024-08-28 08:43:11 +02:00
Dominik
c26b043c58
Add pihole api [endpoint] callback suitable for local API requests (#5736) 2024-08-28 08:36:39 +02:00
Adam Warner
cfbf3f61cd
Update advanced/Scripts/database_migration/gravity/16_to_17.sql
Co-authored-by: Dominik <DL6ER@users.noreply.github.com>
Signed-off-by: Adam Warner <github@adamwarner.co.uk>
2024-08-26 21:30:12 +01:00
DL6ER
e8582f7740
Add pihole -h and autocompletion entry
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-08-26 19:44:42 +02:00
DL6ER
9e9c985245
FTL checkout: Check for availability of branches before trying to download from the webserver. Also, fix check_download_exists() possibly killing the script on non-availability of requested branches
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-08-26 06:11:42 +02:00
DL6ER
a302d7b5d7
Make the help text of "pihole checkout [what] [branch]" more colorful
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-08-26 05:22:15 +02:00
Adam Warner
72afa1073d
Add missing creation of table antigravity in migration script 16 to 17
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2024-08-25 21:47:07 +01:00
DL6ER
b304562c8e
Add session details to API command output
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-08-24 10:39:12 +02:00
DL6ER
8e4fc27168
Add pihole api [endpoint] callback suitable for local API requests
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-08-24 10:06:48 +02:00
Allen
27fd80c01e
[fix] [v6] typo in bash-completion allow-regex option
also removes a space from double whitespace

Signed-off-by: Allen Dema <64094914+allendema@users.noreply.github.com>

Signed-off-by: Allen <64094914+allendema@users.noreply.github.com>
2024-08-15 02:31:33 +02:00
Christian König
1ed5994fa5 Remove temporal log file symlink code. It was introduced 2 years ago with v5.11 and always thought to be temporarily only
Signed-off-by: Christian König <github@yubiuser.dev>
2024-07-29 09:25:12 +02:00
Christian König
db1431a1ae Remove obsolet files
Signed-off-by: Christian König <github@yubiuser.dev>
2024-07-29 09:25:12 +02:00
Christian König
2c32d485bd
Remove obsolet getFTLPIDFile()
We can get the path of the PID file via getFTLConfigValue files.pid

Signed-off-by: Christian König <github@yubiuser.dev>
2024-07-27 22:00:52 +02:00
DL6ER
897e23089c
Implement pihole enable/disable using the API
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-07-16 10:56:37 +02:00
DL6ER
7ca4b59b34
Do not test API availability outside of LoginAPI
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-07-16 10:27:07 +02:00
DL6ER
12fbf86f66
Merge branch 'development-v6' into new/cli_pw
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-07-08 19:18:21 +02:00
Christian König
fafd47ba75
Please editorconfig-checker
Signed-off-by: Christian König <ckoenig@posteo.de>
2024-07-02 20:57:28 +02:00
DL6ER
21fb5dabe1
Use "remove" and "delete" instead of "not" to trigger listed domain removals
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-06-29 09:32:13 +02:00
DL6ER
c2ed30480d
Show when requested domains were not found on the list
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-06-25 14:10:35 +02:00
DL6ER
ccdbfd4130
Use natural langauge for list manipulations, like pihole allow example.com or pihole deny other.net. Also remove using pihole deny not bad.org
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-06-25 13:56:49 +02:00
DL6ER
5dfcd02c40
Improve pihole -f
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-06-22 10:31:03 +02:00
DL6ER
25f384a923
Do not use CLI password when no password is set at all
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-06-20 19:41:47 +02:00
DL6ER
bfc18f8329
Rewrite list functions to use the API
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-06-19 23:04:39 +02:00
DL6ER
92b15cf744
Modify pihole arpflush to stop FTL while performing the action and use the new TOML config values
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-06-19 22:49:11 +02:00
DL6ER
5cb9f4faaa
Modify pihole -f to use TOML config items
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-06-19 22:28:14 +02:00
DL6ER
4df7cee6c2
Add partial matching hint if exact matching found nothing
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-06-19 22:21:43 +02:00
DL6ER
a2951cd3b8
Hide successful login/logout messages to avoid cluttering the terminal
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-06-19 22:19:54 +02:00
DL6ER
520641fa5e
Try to use the CLI password for logins (if enabled and readable by the current user)
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-06-19 22:18:11 +02:00
DL6ER
e232361b2d
Add CAP_SYS_TIME to FTL's ambient capabilities
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-06-07 19:02:43 +02:00
Jack'lul
7b19b650d4 Fix version check for release Docker images
Signed-off-by: Jack'lul <jacklulcat@gmail.com>
2024-05-27 23:04:53 +01:00
DL6ER
c02401b81e
Highlight "### CHANGED" strings in the debug log of pihole.toml
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-03-09 16:57:28 +01:00
DL6ER
9ff43040ec
Add list type in pihole -q
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-02-13 09:58:29 +01:00
DL6ER
75fadb9b55
Adlists need to be grouped by both address and type to differentiate between anti-/gravity lists
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-02-13 08:55:26 +01:00
DL6ER
1a59b407e0
Merge branch 'development-v6' into tweak/allow_adlist_dups 2024-02-13 07:47:30 +01:00
DL6ER
b5ab8ac198
Change UNIQUEness constraint from (address) to (address, type) in the adlist table. This will allow certain adlists to be associated to different groups. A possible scenario is an adlist meant to block a specific service (e.g. Twitter, Youtube, etc.). It can then either be used to ensure these services are really blocked on the devices of group A but will never be blocked on devices of group B.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-02-11 16:54:22 +01:00
DL6ER
8b3469cabc
Merge branch 'development-v6' into development-v6-merge-development
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-02-11 16:41:41 +01:00
yubiuser
aca7b31b83
Remove local.list and openVPN traces (#5480) 2024-02-10 06:16:00 +01:00
Dominik
8f36fdf11c
Make IDs of anti-/gravity lists available in vw_(anti)gravity (#5526) 2024-02-09 20:52:29 +01:00
Adam Warner
f193edd428
Merge branch 'development' into development-v6-merge-development (resolved conflicts)
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2024-02-09 19:22:53 +00:00
DL6ER
31a8f150b2
Add checking for availability of ftl.pi-hole.net when using FTL from a custom branch. If the server is down (or the user is offline, cannot resolve the domain, etc.), we fail early and hard instead of possibly corrupting the installation
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-01-31 08:00:28 +01:00
yubiuser
cc8f9fe057
Use 204 return code for deleted sessions (#5541) 2024-01-27 22:05:09 +01:00
DL6ER
47f06dfd71
Do not store remote version in versions file if on custom branch. It's always wrong here
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-01-15 20:53:34 +01:00
Christian König
debab10792
Use 204
Signed-off-by: Christian König <ckoenig@posteo.de>
2024-01-11 20:42:32 +01:00
DL6ER
d2828310f2
Modify DELETE triggers to delete BEFORE instead of AFTER to prevent possible foreign key constraint violations
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-12-28 11:12:20 +01:00
DL6ER
00340136bd
Extend %iface logic to the dig test. Also fix intentation in this function
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-12-26 21:35:24 +01:00
DL6ER
0c6363572b
Append the interface to the gateway address if it is a link-local address
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-12-25 22:00:49 +01:00
DL6ER
1b87ec067e
Exit early if the database does not exist (e.g. in some CI tests)
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-12-25 06:12:18 +01:00
DL6ER
0066c6fbff
Make IDs of anti-/gravity lists available in vw_(anti)gravity
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-12-25 05:29:29 +01:00
Dominik
719ce801f5
Add "-ni" to all sqlite3 invocations (#5518) 2023-12-10 10:17:48 +01:00
Christian König
c3c31a1a60 Print version details automatically if not on master
Signed-off-by: Christian König <ckoenig@posteo.de>
2023-12-09 23:14:58 +01:00
Christian König
b333e30162 Remove version options from bash completion
Signed-off-by: Christian König <ckoenig@posteo.de>
2023-12-09 23:14:58 +01:00
Christian König
fe4d934a40 Simplify pihole -v
Signed-off-by: Christian König <ckoenig@posteo.de>
2023-12-09 23:13:04 +01:00
yubiuser
a6c0d279b6
Remove obsolete sudo file (#5514) 2023-12-09 23:11:04 +01:00
DL6ER
3f7413d538
Add "-ni" to all sqlite3 invocations
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-12-09 23:07:35 +01:00
DL6ER
c90a27c509
Add "-ni" to all sqlite3 invocations
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-12-09 23:06:50 +01:00
Christian König
6d02d4056f
Rename option --admin to --web in version function
Signed-off-by: Christian König <ckoenig@posteo.de>
2023-12-09 22:01:30 +01:00