1
0
mirror of https://github.com/pi-hole/pi-hole synced 2024-11-18 14:18:15 +00:00
Commit Graph

1290 Commits

Author SHA1 Message Date
yubiuser
c6a2a6f739
Install pihole-FTL.conf template on fresh installation (#4496)
Signed-off-by: Christian König <ckoenig@posteo.de>
2022-01-04 19:09:30 +00:00
yubiuser
0e359a6321
Set dnsmasq interface listening by default to local (#4509)
Signed-off-by: Christian König <ckoenig@posteo.de>
2022-01-04 09:40:07 +01:00
WaLLy3K
5bd7cc9c9d
Replace which with command -v (#4499)
Signed-off-by: WaLLy3K WaLLy3K@users.noreply.github.com
2022-01-01 18:02:20 +00:00
DL6ER
886f0c7df3
Merge pull request #4485 from pi-hole/tweak/web_status
Return the port FTL is listening on in pihole status function
2021-12-29 11:13:12 +01:00
Matthew Nickson
71ed842dfd
Fixed path to 404 file when using custom.php (#4488)
Signed-off-by: Computroniks <mnickson@sidingsmedia.com>
2021-12-28 19:32:06 +01:00
Christian König
2a869419b4
Add netcat to dependencies
Signed-off-by: Christian König <ckoenig@posteo.de>
2021-12-28 12:18:39 +01:00
Chiller Dragon
e485a7b9bb
Some shellchecks in basic-install.sh (#4088)
* Some shellchecks in basic-install.sh

Signed-off-by: ChillerDragon <ChillerDragon@gmail.com>

* Use more explicit grep (thanks to @MichaIng)

Signed-off-by: ChillerDragon <ChillerDragon@gmail.com>
2021-12-02 14:44:50 +01:00
jbzdarkid
bc8150adfa Clean up bash script formatting
Done with the help of beautysh (a python-based bash formatter)

Signed-off-by: jbzdarkid <jbzdarkid@gmail.com>
2021-11-25 14:12:09 -08:00
MichaIng
996a2c74fa
Use a fixed list height for network interface selection
This solves the issue reported here: https://github.com/pi-hole/pi-hole/issues/4196
It replaces the other suggested solution here: https://github.com/pi-hole/pi-hole/pull/4197

The benefit of using a fixed/limited list height, compared to allowing larger whiptail/dialogue dimension, is that it works on small screens as well, where the screen or console size itself is too small to hold the interface list + text above + whiptail frame.

It the amount of list elements exceeds the defined list height, automatically a visual scroll bar is added and the list can be scrolled with up/down pageup/pagedown buttons, hence it is generally not required to adjust a list height based on the amount of elements. The fixed height of "6" is chosen since all other "--radiolist" calls use this fixed height as well, it fits and looks good within a 20 rows high whiptail dialogue, and in the common Pi-hole use cases there are no more than 6 network interfaces.

Signed-off-by: MichaIng <micha@dietpi.com>
2021-11-22 13:25:13 +01:00
yubiuser
ac4a975be5
Allow users to skip setting static IP adress (#4419)
* Allow users to skip setting static IP adresss

Signed-off-by: Christian König <ckoenig@posteo.de>
2021-11-06 20:32:03 +00:00
yubiuser
996f8fff28
Recommend apt instead of apt-get if updating the package cache failed (#4421)
* Only change the recommendation to use apt

Signed-off-by: Christian König <ckoenig@posteo.de>
2021-11-04 15:55:16 -07:00
MichaIng
04f9e92bff
Fix PHP8.0 detection (#4383)
The phpInsNewer variable is not set anymore, so that the JSON module is now always tried to be installed. Instead of checking for phpInsNewer to derive whether PHP was installed already, phpInsMajor is now checked. If it is set, PHP is installed already, and only if the major version is lower than 8, the JSON module can be installed.

Signed-off-by: MichaIng <micha@dietpi.com>
2021-10-11 20:43:12 +01:00
Adam Warner
99981b5e66 now that whiptail size is fixed, lose a couple of lines from the final whiptail output
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2021-10-11 09:55:56 +02:00
yubiuser
9535e2fd6d
Merge pull request #4363 from xanoni/update-upstream-dns-capabilities
Update upstream DNS server capability descriptions
2021-10-06 07:18:14 +02:00
Adam Warner
0ea7344c30
add --no-rebase to the git pull command(s) to squelch hint message in newer versions of git (#4226)
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2021-10-06 01:19:28 +01:00
Adam Warner
55dce14655
Add execution bit accidentally dropped in #4106 (#4368)
Add some smoke tests for the repository.
 - Add x bit to piholeCheckout.sh. Possibly not needed, but consistency is no bad thing
 - Ensure all files in script directorys have executable bit set

Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2021-10-05 19:34:51 +01:00
MichaIng
c5828df198
Consequently use defined file path variables (#4105)
The script defines variables for the most important file paths which are not always used to call the file paths. "lighttpdConfig" was never used in the script itself, so that a shellcheck exception needed to be used. With this change, the defined variables are consequently used, which makes the shellcheck exception obsolete as well.

Additionally the assigned strings are quoted, which is not necessary here but aligns with the coding standard and highlights the strings in most editors and development platforms for developer convenience.

Signed-off-by: MichaIng <micha@dietpi.com>
2021-10-05 16:40:12 +01:00
yubiuser
80560d4a4a
Do not export DNS_FQDN_REQUIRED and DNS_BOGUS_PRIV unconditionally (#4354)
* Do not export unconditionally

Signed-off-by: Christian König <ckoenig@posteo.de>

* Check if variable is unset instead of grep for it

Signed-off-by: Christian König <ckoenig@posteo.de>

* Use bash's buld in word syntax

Signed-off-by: Christian König <ckoenig@posteo.de>

* Move export back to their brothers

Signed-off-by: Christian König <ckoenig@posteo.de>
2021-10-05 14:36:00 +01:00
yubiuser
2b74b47b4a
Remove netcat from dependencies (#4346)
Signed-off-by: Christian König <ckoenig@posteo.de>
2021-10-05 01:47:18 +01:00
yubiuser
109340033e
Do not account for refactor anymore (#4355)
Signed-off-by: Christian König <ckoenig@posteo.de>
2021-10-05 01:22:27 +01:00
xanoni
0f246b8df5
Update upstream DNS server capability descriptions
Mention that the below 3 upstream DNS support DNSSEC:
- Cloudflare (see https://developers.cloudflare.com/1.1.1.1/faq#how-does-1111-work-with-dnssec)
- DNS.WATCH (see https://dns.watch/index)
- Google (see https://developers.google.com/speed/public-dns/faq#dnssec)
- Quad9 (see https://www.quad9.net/support/faq/#dnssec)

Other providers and capabilities (e.g., ECS) were not checked.

Signed-off-by: xanoni <77220130+xanoni@users.noreply.github.com>
2021-10-04 13:55:20 -04:00
Adam Warner
5b03160295
Install script comment tweaks (#4361) 2021-10-04 11:40:53 +01:00
Christian König
a9b9718ffa Do not let the user select if they want to blocking via IPv4 and/or IPv6
Signed-off-by: Christian König <ckoenig@posteo.de>
2021-10-02 23:29:23 +02:00
MichaIng
fd050693a2 Remove obsolete DEB package name checks
The installer contains three checks for specific DEB package names, which did change in past Debian/Ubuntu versions. These checks are obsolete with the current set of supported distro versions:

iproute vs iproute2: All distro versions down to Debian Jessie and Ubuntu Xenial ship the iproute2 package:
- https://packages.debian.org/search?keywords=iproute
- https://packages.ubuntu.com/search?suite=all&keywords=iproute

php5 vs php: None of the Ubuntu version down to Xenial and only Debian Jessie ships the php5 package:
- https://packages.debian.org/search?keywords=php5
- https://packages.ubuntu.com/search?suite=all&keywords=php5
Moreover, installs with PHP5 would fail anyway for a longer time, due to the added php-xml module package, which became a dedicated package with PHP7.0 while being part of the core package with PHP5:
- https://packages.debian.org/search?keywords=php5-xml

php-sqlite vs php-sqlite3: With PHP7, the SQLite module package name changed to sqlite3 prefix:
- https://packages.debian.org/search?keywords=php-sqlite
- https://packages.ubuntu.com/search?suite=all&keywords=php-sqlite

Additionally the code comment about minimal apt-get call output was moved to the actual apt-get install call section, as if refers to issues with package installs that require interactive action and hence output about it to the console. The package cache update as well requires an interactive confirmation when the underlying suite code name changes, e.g. when "buster" becomes "oldstable" and "bullseye" becomes "stable". But that is not what the referred issue was about.

The comments around the installer and Pi-hole package dependencies have been aligned with the current v6 branch as attempt to resolve merge conflicts in the first place.

Signed-off-by: MichaIng <micha@dietpi.com>
2021-10-01 16:12:06 +02:00
yubiuser
841222fa21
Add to INSTALLER_DEPS (#4343)
Signed-off-by: Christian König <ckoenig@posteo.de>
2021-09-26 10:50:03 -07:00
Christian König
a88a94c4f1 Export DNS_FQDN_REQUIRED and DNS_BOGUS_PRIV to setupVars.conf during installation
Signed-off-by: Christian König <ckoenig@posteo.de>
2021-09-13 08:06:19 +02:00
yubiuser
1c286c7bc4
Select proper PHP version on RPM based OS after INSTALLER_DEPS have been installed (#4325)
* Select proper PHP version on RPM based OS after INSTALLER_DEPS have been installed

* Remove check for unsupported RPM distros as it is checked in os_check already

* Add select_rpm_php function to tox tests

Signed-off-by: Christian König <ckoenig@posteo.de>
2021-09-12 13:40:37 -07:00
Adam Warner
e393048488
Merge pull request #4229 from MichaIng/patch-3
Hardcode whiptail dimensions to 20 rows and 70 chars width
2021-09-11 21:37:14 +01:00
Adam Warner
89e187947e
Merge pull request #4282 from pi-hole/new/RFC6761
Install RFC6761 config file
2021-09-11 20:44:46 +01:00
Christian König
839a70cc37 Add sudo to apt-get recommendation
Signed-off-by: Christian König <ckoenig@posteo.de>
2021-08-27 19:16:15 +02:00
DL6ER
ff64d8cf4d
Use variable in user output, too
Signed-off-by: DL6ER <dl6er@dl6er.de>
2021-08-16 09:57:12 +02:00
MichaIng
e1dca46423 Hardcode whiptail dimensions to 20 rows and 70 chars width
With the suggested way to call the installer via "curl -sSL https://install.pi-hole.net | bash", STDIN is no terminal, but overridden by the curl output, hence in most cases, the minimum dimensions were applied, even on larger screens. All whiptail calls are hence assured to work fine with those dimensions, aside of one case, making the calculations obsolete.

This commit hardcodes the whiptail dimensions to the prior minimum and removes the calculations. This also helps with testing, as it does not matter anymore how the script is called, and developers have a clearly defined space to make dialogs look nice, including line breaks, menu and list heights.

The only case which does not fit the 70 character width, the second menu entry of the "pihole -r" dialog, has been shortened accordingly. This was not an issue before, as "pihole -r" does not override the scripts STDIN and hence did allow larger dimensions based on the now removed calculations.

See the following discussions for reference:
- https://github.com/pi-hole/pi-hole/issues/3323
- https://github.com/pi-hole/pi-hole/pull/4197#issuecomment-876702380

Signed-off-by: MichaIng <micha@dietpi.com>
2021-08-15 18:04:11 +02:00
DL6ER
ea5a3bf0b2
Install RFC6761 config file
Signed-off-by: DL6ER <dl6er@dl6er.de>
2021-08-15 11:21:24 +02:00
Adam Warner
bdab701470
Remove dhcpcd5 dependency, however still help the user set the static IP if dhcpd5 is already installed (i.e on raspbian)
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2021-08-05 19:02:37 +01:00
Adam Warner
1ecb9165ee
Remove weird global counter
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2021-08-05 19:02:37 +01:00
Adam Warner
2ff3b95117
put FTL Install back to where it was
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2021-08-05 19:02:37 +01:00
Adam Warner
3ad5097b12
Change initial install script order:
1. Ensure we have a compatible package manager
  2. Install required packages for os_check to run (we need dnsutils and grep for this
  3. Try to install FTL
  4. FTL installed? Install installer dependencies and continue as normal - no other dependencies are installed until user has gone through all whiptails

Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2021-08-05 19:02:37 +01:00
Adam Warner
d68a2ffaf3
Install only minimal requiered package before performing os_check
Co-authored-by: Christian König <ckoenig@posteo.de>
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2021-08-05 19:02:36 +01:00
Adam Warner
913dcead7f
move chmod/chown of macvendor.db to pihole-FTL.service
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2021-08-05 19:02:36 +01:00
Adam Warner
1358209a9a
rename distro_check to package_manager_detect, as it is more in keeping with what the function actually does
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2021-08-05 19:02:36 +01:00
DL6ER
d0eb0d5037
Remove extra failure display when installation of logrotate file is skipped because the file already exists
Signed-off-by: DL6ER <dl6er@dl6er.de>
2021-07-28 21:18:02 +02:00
Dan Schaper
b1ea60484e
Guard for logrotate func non-zero return
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2021-07-26 13:22:26 -07:00
Daniel
fdca19e66d Support and test Debian Bullsye (11)
Signed-off-by: Daniel <daniel@developerdan.com>
2021-07-07 19:09:54 +00:00
Adam Warner
8c926d6af6
Merge pull request #4158 from MichaIng/patch-2
Remove false statement about dependency removal on Raspbian
2021-07-04 00:43:09 +01:00
Adam Warner
c120f8a8d8
Revert "Include lighttpd-mod-deflate since it is no longer provided by default in Bullsye" 2021-07-02 22:09:41 +01:00
Daniel
2b49988013
Include lighttpd-mod-deflate in the PIHOLE_WEB_DEPS list since it is no longer provided by default in Debian Bullseye
Signed-off-by: Daniel <daniel@developerdan.com>
2021-07-01 02:20:22 +00:00
Dan Schaper
4f660966d0
Shellchecker
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2021-06-20 11:19:19 -07:00
Dan Schaper
7df22cd8e0
Check for logroate script existing first.
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2021-06-20 11:18:33 -07:00
MichaIng
c901443676 Remove false statement about dependency removal on Raspbian
The statement "All dependencies are safe to remove on Raspbian" has been added at a time where a much smaller list of dependencies were installed, all indeed relatively safe to purge. Nowadays this list has grown and includes important system packages, like iproute2, psmisc, sudo, curl and others, which are often again dependencies of other packages, like network stacks (ifupdown) and others, so that inexperienced users, following that statement, may break their systems network capabilities and more.

This message has hence been removed.

Signed-off-by: MichaIng <micha@dietpi.com>
2021-05-02 13:29:28 +02:00
MichaIng
f3ceebbe06
Re-remove wget from dependencies
The dependency has been removed here: https://github.com/pi-hole/pi-hole/pull/3185
But accidentally re-added here: 982c1b0059 (diff-595630a29a855f6d667a84ca0662042e826bf3ec56322ef61d4a6ef149147d23)

wget is still not used in any Pi-hole script, hence it can be removed safely from dependencies.

Signed-off-by: MichaIng <micha@dietpi.com>
2021-04-30 20:48:12 +02:00