1
0
mirror of https://github.com/pi-hole/pi-hole synced 2025-07-30 19:08:09 +00:00
Commit Graph

1595 Commits

Author SHA1 Message Date
yubiuser
d177c4c776
Add useful comment
Co-authored-by: Dan Schaper <dan.schaper@pi-hole.net>
Signed-off-by: yubiuser <github@yubiuser.dev>
2025-05-30 19:03:12 +02:00
Christian König
69473a7b54
Add awk to meta package dependencie (is missing on Fedora 42 by default) and order dependencies alphabetically
Signed-off-by: Christian König <github@yubiuser.dev>
2025-05-28 19:54:44 +02:00
Christian König
137338e6a8
Use service wrappers in all scripts
Signed-off-by: Christian König <github@yubiuser.dev>
2025-05-27 21:23:56 +02:00
Christian König
b707890f10
Use PID1 to determine which command to use when toggeling services
Signed-off-by: Christian König <github@yubiuser.dev>
2025-05-27 20:09:59 +02:00
Dominik
822e677c5c
Use a more general method to determine whether systemd is the init system (#6043) 2025-05-27 19:33:57 +02:00
Piotr Tyrakowski
88934ec818
Update basic-install.sh
Signed-off-by: Piotr Tyrakowski <verscup@gmail.com>
2025-05-14 21:47:34 +02:00
RD WebDesign
e01d49b3ee
Change FTLcheckUpdate to use api.github.com and jq to retrieve tag_name
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
2025-05-12 15:53:12 -03:00
Dan Schaper
99d00e0ed0
Do not try to upgrade gravity if it does not exist (#6218) 2025-05-11 08:47:46 -07:00
Dan Schaper
3c0ff57660
Allow alternative cron daemons on Debian (#6180) 2025-05-11 08:12:29 -07:00
Christian König
d45003a8ca
Do not try to upgrade gravity if it does not exist
Signed-off-by: Christian König <github@yubiuser.dev>
2025-05-05 17:27:53 +02:00
Christian König
96437dc913
Set dns.interface during installation
Signed-off-by: Christian König <github@yubiuser.dev>
2025-05-04 19:39:43 +02:00
Christian König
40da3a40ec
Remove os_check from install script
Signed-off-by: Christian König <github@yubiuser.dev>
2025-04-28 21:03:08 +02:00
Ihor Urazov
cff7f40739
Allow alternative cron daemons on Debian
Add cron-daemon virtual package as an alternative dependency. This way
pihole-meta by default still depends on cron, but allows installation of
systemd-cron, which completely replaces cron daemon and package. With
systemd-cron functionality of crontab files and /etc/cron.* directories
works expected, as systemd-cron generates systemd timers from cron
files.

Signed-off-by: Ihor Urazov <iurazov@healthjoy.com>
2025-04-19 20:33:19 +03:00
yubiuser
248d25b8d0
Install on IPv6-only/DNS64/NAT64 system (#6144) 2025-04-15 17:33:09 +02:00
Rob Gill
9e62625f83
Install on IPv6-only/DNS64/NAT64 system
Alters the test for IPv4 route so the installer doesn't fail instantly on IPv6-only.

Gives user a dialog to proceed with IPv6 only installation

Switches DNS server options to only contain IPv6 addresses.

Signed-off-by: Rob Gill <rrobgill@protonmail.com>
2025-04-15 14:13:43 +10:00
Christian König
5002ce8ba7
Source files relative to the repos root
Signed-off-by: Christian König <github@yubiuser.dev>
2025-04-07 14:10:01 +02:00
Adam Warner
3732ea7365
Remove shellcheck directives that no longer serve any purpose
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2025-04-07 10:24:53 +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
48c59cb6cf
In ./automated install/uninstall.sh line 14:
readonly ADMIN_INTERFACE_DIR=$(getFTLConfigValue "webserver.paths.webroot")$(getFTLConfigValue "webserver.paths.webhome")
         ^-----------------^ SC2155 (warning): Declare and assign separately to avoid masking return values.

In ./advanced/Scripts/update.sh line 39:
readonly ADMIN_INTERFACE_DIR=$(getFTLConfigValue "webserver.paths.webroot")$(getFTLConfigValue "webserver.paths.webhome")
         ^-----------------^ SC2155 (warning): Declare and assign separately to avoid masking return values.

In ./advanced/Scripts/updatecheck.sh line 45:
readonly ADMIN_INTERFACE_DIR=$(getFTLConfigValue "webserver.paths.webroot")$(getFTLConfigValue "webserver.paths.webhome")
         ^-----------------^ SC2155 (warning): Declare and assign separately to avoid masking return values.

Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2025-04-06 14:20:51 +01:00
Adam Warner
f01e8c70d9
Weirldly, GHA missed these minor warnings however have disabled them as they are due to variables either being used in or declared in basic-install,.sh
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2025-04-06 14:11:40 +01:00
Adam Warner
39f5115135
In ./automated install/basic-install.sh line 1753:
local status=$(curl --head --silent "https://ftl.pi-hole.net/${1}" | head -n 1)
          ^----^ SC2155 (warning): Declare and assign separately to avoid masking return values.

In ./automated install/basic-install.sh line 2076:
            elif [ $? -eq 2 ]; then
                   ^-- SC2319 (warning): This $? refers to a condition, not a command. Assign to a variable to avoid it being overwritten.

Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2025-04-06 14:11:40 +01:00
Adam Warner
7e5d9db6b7
Remove no-longer-needed pihole sudoers file (#6143) 2025-04-06 13:52:37 +01:00
Adam Warner
bdcb6fc88c
Update update.sh, updatecheck.sh and uninstall.sh to honour pihole.to… (#5981) 2025-04-05 01:18:49 +01:00
Christian König
fe2b22c570
Add recommended fields to the deb package
Signed-off-by: Christian König <github@yubiuser.dev>
2025-04-05 00:29:13 +01:00
Adam Warner
f98b9520e4
v5 sudoers file that allowed www-data to run pihole command is no longer needed. "Fixes" #6066
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2025-04-04 23:19:14 +01:00
James George
0f482396ee
Update update.sh, updatecheck.sh and uninstall.sh to honour pihole.toml settings for webserver.paths.webroot and webserver.paths.webhome
When uninstalling, remove web interface parent directory empty check and possible removal.

Signed-off-by: James George <james.george@vigilantvoid.com>
2025-03-30 13:11:21 +08:00
DL6ER
bef8227cbd
Use a more general method to determine whether systemd is the init system
Signed-off-by: DL6ER <dl6er@dl6er.de>
2025-03-03 20:16:07 +01:00
Adam Warner
978694f262
Improve update/fresh install detection (#6034) 2025-03-03 12:23:29 +00:00
Dan Schaper
f207385269
Removing kernel check based on discussion in Pi-Hole PR pi-hole#5957. (#6020) 2025-02-28 20:00:00 -08:00
Adam Warner
ce73691082
Juggle some code around:
- Move random password generation block inside final "fresh install" if block, ensure password is ONLY generated on fresh installs.
 - Add additional check for fresh install around setting of PIHOLE_DNS1/2, QUERY_LOGGING, and PRIVACY_LEVEL
 - Remove dedicated displayFinalMessage function.

Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2025-02-28 23:06:52 +00:00
Adam Warner
8874757958
Start by renaming useUpdateVars to fresh_install and flipping the logic, the old name is not relevant any more
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2025-02-28 21:29:33 +00:00
Adam Warner
821c953216
Remove 'reconfigure' option (#5887) 2025-02-28 21:14:18 +00:00
Christian König
7282aada25
Don't show a warning before the repair is done
Signed-off-by: Christian König <github@yubiuser.dev>
2025-02-28 11:51:09 +01:00
UltChowsk
869411a514
Fixing whitespaces after removing lines.
Signed-off-by: UltChowsk <ult@chowsk.net>
2025-02-27 06:24:13 -05:00
UltChowsk
d1b5f95aa7
Removing kernel check based on discussion in Pi-Hole PR pi-hole#5957.
Signed-off-by: UltChowsk <ult@chowsk.net>
2025-02-26 20:37:20 -05:00
MichaIng
729a44f82a
Do not hide error messages when dealing with services
If service start/stop/restart/enable/disable fails, it help to debug the issue, if STDERR is not hidden, hence the error message can be seen. systemctl furthermore has the `-q` option to suppress non-error output. It works as well for "is-enabled", but until a certain systemd version still throws an error, if the checked service does not exist at all. Once Debian Bullseye support is dropped by Pi-hole, also STDERR form systemctl is-enabled does not need to be suppressed anymore.

Signed-off-by: MichaIng <micha@dietpi.com>
2025-02-23 15:48:32 +01:00
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
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
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
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
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
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
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
Christian König
dfc2b32248
Use better function name
Signed-off-by: Christian König <github@yubiuser.dev>
2025-02-06 21:57:17 +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
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
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
Dominik
4be130971e
Update automated install/basic-install.sh
Co-authored-by: yubiuser <github@yubiuser.dev>
Signed-off-by: Dominik <DL6ER@users.noreply.github.com>
2025-01-09 18:32:04 +01:00