1
0
mirror of https://github.com/pi-hole/pi-hole synced 2024-10-31 20:59:00 +00:00
Commit Graph

1184 Commits

Author SHA1 Message Date
Adam Warner
48820d181c
Merge pull request #3620 from yubiuser/tweak/dig_supportedOS
Report and exit if dig supportedOS returns nothing
2020-07-30 17:00:01 +01:00
Christian König
6fc7dc28a2 Count elements of array instead
Signed-off-by: Christian König <ckoenig@posteo.de>
2020-07-28 10:25:57 +02:00
Christian König
b207ceeab2 Report and exit if dig supportedOS returns nothing
Signed-off-by: Christian König <ckoenig@posteo.de>
2020-07-28 09:51:31 +02:00
Christian König
8380112129 Resolve conflicts
Signed-off-by: Christian König <ckoenig@posteo.de>
2020-07-28 09:40:45 +02:00
Adam Warner
0ff32c3629
Use ns1.pi-hole.net to resolve versions.pi-hole.net so that we do not see DNS cookie issues
Co-Authored-by: Dan Schaper <dan.schaper@pi-hole.net>
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2020-07-27 17:44:22 +01:00
Adam Warner
ddb36c013d
it helps if the echo goes variable set goes in the right place
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2020-07-22 22:39:03 +01:00
Adam Warner
98dc51869e
accidentally missed \\n
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2020-07-22 22:30:51 +01:00
Adam Warner
510b646736
change up the verbiage with something that works (tested)
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2020-07-22 22:29:38 +01:00
Adam Warner
ea22774d16
Wrap entire function in the check for the ENVVAR
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2020-07-21 18:47:13 +01:00
Adam Warner
643d2c0f3e
add missing port number validation section to valid_ip6
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2020-07-16 21:31:45 +01:00
Adam Warner
533e5dddd0
clarify examples in case of unsupported OS
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2020-07-16 18:33:53 +01:00
Adam Warner
acfb092e4b
fix minor bug in 5.1
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2020-07-15 23:38:08 +01:00
Adam Warner
3205606fc3
Also validate IPV6 in the setdns function
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2020-06-23 20:38:18 +01:00
DL6ER
2c3aa9ab00
Merge pull request #3491 from pi-hole/fix_ip_address_section
Fix fresh install on dev branch not working
2020-06-21 21:58:36 +02:00
DL6ER
bf392d7a60
Merge pull request #3489 from pi-hole/ip_validation
Improve IP validation function
2020-06-21 21:56:30 +02:00
Adam Warner
bbfbf67fcf
further simplify the function, per @dl6er's suggestion
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2020-06-15 22:52:24 +01:00
Adam Warner
fe30ce10d3
simpler regex suggested by @MichaIng
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2020-06-15 21:21:40 +01:00
Adam Warner
7ea6d7b92b
remove ; so IFS changes don't stick
Co-authored-by: Dan Schaper <dan.schaper@pi-hole.net>
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2020-06-14 00:17:51 +01:00
Adam Warner
1ebf0785b6
move dnsutils/bind-utils to installed deps and only check OS is supported after installing installer deps
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2020-06-13 21:33:03 +01:00
Adam Warner
95f4c632f7
expand valid_ip to allow for custom ports
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2020-06-13 20:30:03 +01:00
Dan Schaper
4b59287683
Merge pull request #3441 from pi-hole/new/os_check
Display warning if unsupported OS is detected
2020-06-05 13:39:39 -07:00
Adam Warner
9844a3288f
Same change as 03a8cff
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2020-06-05 21:06:25 +01:00
jesterchen
7248d1a504 Ensure that adlistFile is created before chmodding
If an user installs Pi-hole without selecting any adlists, the installer emits a warning and exits. By touching the file this is prevented.

Signed-off-by: jesterchen <github@jesterweb.de>
2020-06-01 12:06:02 +02:00
XhmikosR
7579ab178a Update links
* use https when possible
* replace coverage with a link to the docs page in README.md
* remove obsolete affiliate link in README.md

Signed-off-by: XhmikosR <xhmikosr@gmail.com>
2020-05-30 21:50:16 +03:00
Adam Warner
4f7bb7b811
Remove deprecated Disconnect lists from "defaults"
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2020-05-26 21:23:44 +01:00
DL6ER
b60ec8a48f
Merge pull request #3248 from MichaIng/patch-8
Start pihole-FTL after network
2020-05-25 21:27:27 +02:00
Adam Warner
acf2879057
Address sticklr complaints
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2020-05-25 17:49:19 +01:00
Adam Warner
af1129fc28
Add a check at the top of the script to determine if the script is being run on a supported OS
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2020-05-25 17:40:20 +01:00
Adam Warner
414ab53d9a
Use toggle instead of select to remove any hint of a doubt that the option already selected by default can be deselected
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2020-05-18 22:29:36 +01:00
MichaIng
5c17e41cf1 Start pihole-FTL after network
"$network" on a systemd-driven OS leads to "After=network-online.target" in the generated systemd unit.
This target is no guarantee that all network interfaces have been fully configured, as it depends on the related network services types, but at least it reduces the risk that those have not fully finished their job when pihole-FTL starts. If this is the case, certain issues can occur:
- https://github.com/pi-hole/pi-hole/issues/2924
- https://discourse.pi-hole.net/t/have-to-pihole-restartdns-after-reboot/28772

Runtime files are now consistently created in "/run" instead of "/var/run". The second is a symlink to the first for backwards compatibility but on none-ancient distro versions one should use "/run", systemd even prints a warnings if service files use "/var/run". The service file used "/run" and "/var/run" both, in cases for the same files/directories before, which does not directly cause issues currently, due to the symlink, but is inconsistent at best.

Signed-off-by: MichaIng <micha@dietpi.com>
2020-05-16 13:38:18 +02:00
pvogt09
3c6ea2612d fix #3336 by creating adlist file even if no list was selected by user
Signed-off-by: pvogt09 <50047961+pvogt09@users.noreply.github.com>
2020-05-15 17:52:57 +02:00
Dan Schaper
c76435883b
Merge pull request #3360 from dnicolson/fix-github-capitalisation
Fix GitHub capitalisation
2020-05-13 16:56:36 -07:00
Dave Nicolson
ab753e88a2 Fix GitHub capitalisation
Signed-off-by: Dave Nicolson <david.nicolson@gmail.com>
2020-05-13 12:55:00 +02:00
MichaIng
7d79cf5cce
Only check SELinux states if "getenforce" command exists
- Currently, if the SELinux config file exists, installed SELinux is assumed.
- But removing e.g. an APT package via "apt-get remove" leaves config files in place, or they could be present for other reasons.
- If the getenforce command is not present but the config file is, currently the installer exists without error message when calling getenforce due to "set -e".
- With this change, the presence of getenforce command is checked first. If it is not present, selinux-utils is not installed, which is a core part of SELinux, pulled in by selinux-basics as well. So it can be assumed that no SELinux is active if this command is missing.

Signed-off-by: MichaIng <micha@dietpi.com>
2020-05-12 23:45:56 +02:00
Adam Warner
9e96ff37de
Fix merge conflicts
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2020-05-12 22:16:43 +01:00
Adam Warner
987ae3810d
binary, here, should be l_binary
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2020-05-11 22:03:33 +01:00
DL6ER
fdaf815f42
Merge pull request #3203 from MichaIng/patch-1
Failsafe checks for available APT package
2020-05-05 10:27:08 +02:00
DL6ER
988b1ff02f
Merge pull request #3204 from MichaIng/patch-3
Revert using hardcoded php-intl meta package
2020-05-05 10:24:56 +02:00
Dan Schaper
df13b9c32a
Merge pull request #3283 from pi-hole/tweak/remove_firewall_config
Remove configureFirewall function, the call to it, and related tests
2020-05-02 10:06:31 -07:00
DL6ER
f4965d8493
Merge pull request #3135 from pvogt09/development
Move permission change behind git reset
2020-04-28 19:44:58 +02:00
DL6ER
c0cf8dba87
Merge pull request #3226 from MichaIng/patch-6
Do not add pihole user to web server group
2020-04-28 19:39:55 +02:00
DL6ER
a9136d752a
Merge pull request #3246 from pvogt09/fix/user_exists
fixes #3217 by checking for existing pihole group
2020-04-28 19:38:12 +02:00
MichaIng
d7bac21149 Dot not add pihole user to web server group
This is and was never required and the pihole user does in fact not get any additional permissions through that group.

Signed-off-by: MichaIng <micha@dietpi.com>
2020-04-26 15:45:29 +02:00
MichaIng
dc6c53b6a3 Revert using hardcoded php-intl meta package
Using the meta package causes several issues:
- Install on Debian prior to Jessie and Ubuntu prior to Xenial is broken, since those do not serve the meta packages but php5-* packages instead.
- If $phpVer != "php", then multiple conflicting PHP versions can be installed.
- If "${phpVer}-intl" does not pull the correct package, then inherently "${phpVer}-xml" etc are wrong, too. This is theoretically possible, e.g. if PHP7.4 was installed while the webserver uses a concurrently installed PHP7.3 instance. Then the "php" shell command output can differ from what the webserver uses. This theoretical issue would need a different approach to derive $phpVer, not based on the shell command output but by asking the webserver somehow in the first place. But using $phpVer for some modules and hardcoded meta for the others can only lead to inconsistencies and issues.

Signed-off-by: MichaIng <micha@dietpi.com>
2020-04-26 15:44:13 +02:00
MichaIng
86d4c9b1e0 Failsafe checks for available APT package
When checking for available packages in APT repository, running a dry-run install can fail for other reasons, even if the package is available. Currently, in such case, wrong fallback packages are selected: https://github.com/pi-hole/pi-hole/issues/2888
"apt-cache show <pkg>" is a quicker method to check for available packages. This is now done as well to check if the fallbacks are available. If none is found, the installer exits with meaningful error message and exit code.

In rare cases, the APT list files can be missing when the installer is started. E.g. this could be on a fresh system, APT lists could have been moved to RAM or removed as a cleanup step. "apt-cache" calls will then fail, same as dry-run installs were. To assure that current package lists are checked, update the package cache directly after the Ubuntu universe repo has been added, only in the Debian/Ubuntu block. This renders the variable handling in RH/Fedora block obsolete.

Signed-off-by: MichaIng <micha@dietpi.com>
2020-04-26 15:42:43 +02:00
pvogt09
462457fe7f
Merge branch 'development' into development 2020-04-24 12:09:49 +02:00
Adam Warner
94a4f844a8
Remove deprecated list
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2020-04-20 21:31:20 +01:00
Adam Warner
d18a8b1b8a
Merge pull request #3205 from MichaIng/patch-5
Reduce apt-get install verbosity
2020-04-19 15:28:48 +01:00
Adam Warner
a37dba2c81
remove configureFirewall function, the call to it, and related tests
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2020-04-19 14:52:01 +01:00
Adam Warner
e6dcccc7bd Revert "- Added 2 new DNS entries for the new Cloudflare DNS for families, which comes in 2 flavors (#3276)"
This reverts commit 7e1a8c1ceb.
2020-04-18 20:05:54 +01:00