1625 Commits

Author SHA1 Message Date
Christian König
fc4c10dbe2 Add bind9-dnsutils as dependency for APT based systems
Signed-off-by: Christian König <github@yubiuser.dev>
2025-10-26 21:06:22 +01:00
Adam Warner
1ca693866c Fix formatting in chooseInterface function to ensure proper variable expansion - with quotes, the dialog command throws the error:
Expected at least 20 tokens for --radi, have 5.
Use --help to list options.

Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2025-10-25 11:31:59 +01:00
Dominik
c0a05297e6 Adjust .shellcheckrc to 0.11 and enable some optional checks (#6374) 2025-10-04 09:11:48 +02:00
Jon Herron
59ccfd6d13 Fix typo found during install
Signed-off-by: Jon Herron <jon.herron@yahoo.com>
2025-09-24 08:43:25 -04:00
Rob Gill
87f307f1d8 Uninstall refactor
Split removePiholeFiles into functions for each category.

Reorder execution so that:
  Pihole-FTL is stopped and removed before shutdown scripts are removed.
  User and group are removed before needed commands are removed.

Remove database and log files in user-specified non-default locations,
and use local directories from basic install.sh, falling back to defaults.

Remove use of sudo as the script already checks that it is called as root.

Advise user of location of crontab backup if is created

Make use of service control functions, command detection and default
directories from basic_install.sh

Align variable names with current basic-install.sh

Disable pihole-FTL service immediately, if systemctl is available

Call systemd daemon-reload after removing service files (on systemd systems)

Signed-off-by: Rob Gill <rrobgill@protonmail.com>
2025-08-29 08:47:00 +10:00
Michael Ziminsky (Z)
f50a4c1c89 Don't use hard-coded path for pihole user nologin shell
Signed-off-by: Michael Ziminsky (Z) <mgziminsky@users.noreply.github.com>
2025-08-16 21:47:57 +00:00
Michael Ziminsky (Z)
3908be911c Alpine: Switch cron service from busybox to cronie during install
Signed-off-by: Michael Ziminsky (Z) <mgziminsky@users.noreply.github.com>
2025-08-16 21:47:56 +00:00
Michael Ziminsky (Z)
44f95a4f57 Alpine: Ensure community repo is enabled and handle dependency install errors
Signed-off-by: Michael Ziminsky (Z) <mgziminsky@users.noreply.github.com>
2025-08-16 21:47:56 +00:00
Michael Ziminsky (Z)
4bf67a3c79 Alpine: Add some additional dependencies and minor script fixes
Signed-off-by: Michael Ziminsky (Z) <mgziminsky@users.noreply.github.com>
2025-08-16 21:47:55 +00:00
Michael Ziminsky (Z)
0db48383ae Add support for alpine
Signed-off-by: Michael Ziminsky (Z) <mgziminsky@users.noreply.github.com>
2025-08-16 21:47:54 +00:00
Christian König
94bbf5f429 Fix shellcheck warnings
Signed-off-by: Christian König <github@yubiuser.dev>
2025-08-07 19:44:26 +02:00
Christian König
5d1ef6279f Fix shellcheck warnings for pihole bash completion
Signed-off-by: Christian König <github@yubiuser.dev>
2025-08-06 13:05:48 +02:00
Christian König
340ffbe5e8 Add pihole-FTL bash completion
Signed-off-by: Christian König <github@yubiuser.dev>
2025-08-06 13:05:36 +02:00
Adam Warner
364ba99b1f Update automated install/basic-install.sh
Co-authored-by: yubiuser <github@yubiuser.dev>
Signed-off-by: Adam Warner <github@adamwarner.co.uk>
2025-07-26 10:56:21 +01:00
Adam Warner
9252e90bd6 Check for the existence of the FTL binary before stopping the service
This prevents errors on fresh installs where the FTL binary does not exist yet.

Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2025-07-26 10:31:58 +01:00
darkexplosiveqwx
e231107e81 Remove netcat from the list of dependencies
Signed-off-by: darkexplosiveqwx <101737077+darkexplosiveqwx@users.noreply.github.com>
2025-07-14 20:18:18 +02:00
Dan Schaper
9605ccc178 basic-install.sh listing interfaces (#6269) 2025-07-13 11:57:32 -07:00
deHakkelaar
86bdae0076 Update basic-install.sh
Added comments
2025-07-13 11:05:58 +02:00
Dan Schaper
3d75ea6df2 Only update the package cache on fresh installations (#6282) 2025-07-10 11:20:03 -07:00
Dan Schaper
080e1ccf8a installer: exit if FTL update check fails (#6316) 2025-07-10 10:59:05 -07:00
MichaIng
3a35e589f2 installer: exit if FTL update check fails
The return code of `FTLdetect()` is used in the installer to know whether FTL has been installed or not.

The function however returns an error only, if the download of FTL fails, not if checking for a latest version/update of FTL fails. This way, installs and rapairs can continue without or with ourdated FTL until `pihole-FTL migrate v6`, which hangs endlessly, if it is a v5 FTL.

This commit handles the return code in `FTLdetect()`, and lets it return true only if FTL download succeeded, or if the update check succeeded and FTL is up-to-date. Else, it could neither be repaired, nor installed, and the error message should give a hint what went wrong, hence exit.

`FTLdetect()` is not called by any other script, hence this change has no surprising effect elsewhere.

Additionally, a syntax error in the `FTLcheckUpdate()` function itself is fixed, which masks the `check_download_exists()` return code, hence always leads to error code 4, if the FTL branch is not `master`.

Signed-off-by: MichaIng <micha@dietpi.com>
2025-06-26 00:53:49 +02:00
Christian König
a48665c7bb Remove deprecated and unused colors
Signed-off-by: Christian König <github@yubiuser.dev>
2025-06-24 18:51:01 +02:00
Adam Warner
f94d9f2540 Add note about adding local user to pihole group to final dialog (#6152) 2025-06-22 14:13:46 +02:00
Christian König
7a16024020 Run package update everytime before building the meta package when invoking from the install script
Signed-off-by: Christian König <github@yubiuser.dev>
2025-06-08 21:31:56 +02:00
Christian König
5777497f52 Separate package manager detection and cache update functions
Signed-off-by: Christian König <github@yubiuser.dev>
2025-06-08 21:25:43 +02:00
Christian König
ea61755881 Only update the package cache on fresh installations
Signed-off-by: Christian König <github@yubiuser.dev>
2025-06-05 12:50:10 +02:00
deHakkelaar
6130b800e3 basic-install.sh listing interfaces
Following up on below one:

https://github.com/pi-hole/pi-hole/pull/6236

And below poor attempt:

https://github.com/pi-hole/pi-hole/pull/6256

Signed-off-by: deHakkelaar <deHakkelaar@users.noreply.github.com>
2025-06-02 03:59:36 +02:00
Dan Schaper
8c81335004 Don't revert the package metadata
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2025-05-31 11:39:13 -07:00
Dan Schaper
e1b05028a7 Revert "Use PID1 to determine which command to use when toggeling services" 2025-05-31 09:14:08 -07:00
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
Christian König
a590b77431 Link to documentation on how to add local user to pihole group
Signed-off-by: Christian König <github@yubiuser.dev>
2025-05-14 09:36:52 +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