mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 02:42:58 +00:00
v5.12.2 (#4922)
This commit is contained in:
commit
d88629e23f
13 changed files with 28 additions and 26 deletions
2
.github/workflows/stale.yml
vendored
2
.github/workflows/stale.yml
vendored
|
@ -13,7 +13,7 @@ jobs:
|
||||||
issues: write
|
issues: write
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/stale@v5.1.1
|
- uses: actions/stale@v5.2.0
|
||||||
with:
|
with:
|
||||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
days-before-stale: 30
|
days-before-stale: 30
|
||||||
|
|
4
.github/workflows/test.yml
vendored
4
.github/workflows/test.yml
vendored
|
@ -51,10 +51,10 @@ jobs:
|
||||||
name: Checkout repository
|
name: Checkout repository
|
||||||
uses: actions/checkout@v3.0.2
|
uses: actions/checkout@v3.0.2
|
||||||
-
|
-
|
||||||
name: Set up Python 3.8
|
name: Set up Python 3.10
|
||||||
uses: actions/setup-python@v4.2.0
|
uses: actions/setup-python@v4.2.0
|
||||||
with:
|
with:
|
||||||
python-version: 3.8
|
python-version: '3.10'
|
||||||
-
|
-
|
||||||
name: Install dependencies
|
name: Install dependencies
|
||||||
run: pip install -r test/requirements.txt
|
run: pip install -r test/requirements.txt
|
||||||
|
|
|
@ -41,6 +41,9 @@ else
|
||||||
#OVER="\r\033[K"
|
#OVER="\r\033[K"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# shellcheck disable=SC1091
|
||||||
|
. /etc/pihole/versions
|
||||||
|
|
||||||
OBFUSCATED_PLACEHOLDER="<DOMAIN OBFUSCATED>"
|
OBFUSCATED_PLACEHOLDER="<DOMAIN OBFUSCATED>"
|
||||||
|
|
||||||
# FAQ URLs for use in showing the debug log
|
# FAQ URLs for use in showing the debug log
|
||||||
|
@ -50,7 +53,6 @@ FAQ_HARDWARE_REQUIREMENTS="${COL_CYAN}https://docs.pi-hole.net/main/prerequisite
|
||||||
FAQ_HARDWARE_REQUIREMENTS_PORTS="${COL_CYAN}https://docs.pi-hole.net/main/prerequisites/#ports${COL_NC}"
|
FAQ_HARDWARE_REQUIREMENTS_PORTS="${COL_CYAN}https://docs.pi-hole.net/main/prerequisites/#ports${COL_NC}"
|
||||||
FAQ_HARDWARE_REQUIREMENTS_FIREWALLD="${COL_CYAN}https://docs.pi-hole.net/main/prerequisites/#firewalld${COL_NC}"
|
FAQ_HARDWARE_REQUIREMENTS_FIREWALLD="${COL_CYAN}https://docs.pi-hole.net/main/prerequisites/#firewalld${COL_NC}"
|
||||||
FAQ_GATEWAY="${COL_CYAN}https://discourse.pi-hole.net/t/why-is-a-default-gateway-important-for-pi-hole/3546${COL_NC}"
|
FAQ_GATEWAY="${COL_CYAN}https://discourse.pi-hole.net/t/why-is-a-default-gateway-important-for-pi-hole/3546${COL_NC}"
|
||||||
FAQ_ULA="${COL_CYAN}https://discourse.pi-hole.net/t/use-ipv6-ula-addresses-for-pi-hole/2127${COL_NC}"
|
|
||||||
FAQ_FTL_COMPATIBILITY="${COL_CYAN}https://github.com/pi-hole/FTL#compatibility-list${COL_NC}"
|
FAQ_FTL_COMPATIBILITY="${COL_CYAN}https://github.com/pi-hole/FTL#compatibility-list${COL_NC}"
|
||||||
FAQ_BAD_ADDRESS="${COL_CYAN}https://discourse.pi-hole.net/t/why-do-i-see-bad-address-at-in-pihole-log/3972${COL_NC}"
|
FAQ_BAD_ADDRESS="${COL_CYAN}https://discourse.pi-hole.net/t/why-do-i-see-bad-address-at-in-pihole-log/3972${COL_NC}"
|
||||||
|
|
||||||
|
@ -465,8 +467,8 @@ diagnose_operating_system() {
|
||||||
# Display the current test that is running
|
# Display the current test that is running
|
||||||
echo_current_diagnostic "Operating system"
|
echo_current_diagnostic "Operating system"
|
||||||
|
|
||||||
# If the PIHOLE_DOCKER_TAG variable is set, include this information in the debug output
|
# If DOCKER_VERSION is set (Sourced from /etc/pihole/versions at start of script), include this information in the debug output
|
||||||
[ -n "${PIHOLE_DOCKER_TAG}" ] && log_write "${INFO} Pi-hole Docker Container: ${PIHOLE_DOCKER_TAG}"
|
[ -n "${DOCKER_VERSION}" ] && log_write "${INFO} Pi-hole Docker Container: ${DOCKER_VERSION}"
|
||||||
|
|
||||||
# If there is a /etc/*release file, it's probably a supported operating system, so we can
|
# If there is a /etc/*release file, it's probably a supported operating system, so we can
|
||||||
if ls /etc/*release 1> /dev/null 2>&1; then
|
if ls /etc/*release 1> /dev/null 2>&1; then
|
||||||
|
@ -802,7 +804,7 @@ check_networking() {
|
||||||
ping_gateway "6"
|
ping_gateway "6"
|
||||||
# Skip the following check if installed in docker container. Unpriv'ed containers do not have access to the information required
|
# Skip the following check if installed in docker container. Unpriv'ed containers do not have access to the information required
|
||||||
# to resolve the service name listening - and the container should not start if there was a port conflict anyway
|
# to resolve the service name listening - and the container should not start if there was a port conflict anyway
|
||||||
[ -z "${PIHOLE_DOCKER_TAG}" ] && check_required_ports
|
[ -z "${DOCKER_VERSION}" ] && check_required_ports
|
||||||
}
|
}
|
||||||
|
|
||||||
check_x_headers() {
|
check_x_headers() {
|
||||||
|
@ -812,7 +814,7 @@ check_x_headers() {
|
||||||
# Similarly, it will show "X-Pi-hole: The Pi-hole Web interface is working!" if you view the header returned
|
# Similarly, it will show "X-Pi-hole: The Pi-hole Web interface is working!" if you view the header returned
|
||||||
# when accessing the dashboard (i.e curl -I pi.hole/admin/)
|
# when accessing the dashboard (i.e curl -I pi.hole/admin/)
|
||||||
# server is operating correctly
|
# server is operating correctly
|
||||||
echo_current_diagnostic "Dashboard and block page"
|
echo_current_diagnostic "Dashboard headers"
|
||||||
# Use curl -I to get the header and parse out just the X-Pi-hole one
|
# Use curl -I to get the header and parse out just the X-Pi-hole one
|
||||||
local full_curl_output_dashboard
|
local full_curl_output_dashboard
|
||||||
local dashboard
|
local dashboard
|
||||||
|
@ -822,7 +824,7 @@ check_x_headers() {
|
||||||
local dashboard_working
|
local dashboard_working
|
||||||
dashboard_working="X-Pi-hole: The Pi-hole Web interface is working!"
|
dashboard_working="X-Pi-hole: The Pi-hole Web interface is working!"
|
||||||
|
|
||||||
# Same logic applies to the dashboard as above, if the X-Header matches what a working system should have,
|
# If the X-Header matches what a working system should have,
|
||||||
if [[ $dashboard == "$dashboard_working" ]]; then
|
if [[ $dashboard == "$dashboard_working" ]]; then
|
||||||
# then we can show a success
|
# then we can show a success
|
||||||
log_write "$TICK Web interface X-Header: ${COL_GREEN}${dashboard}${COL_NC}"
|
log_write "$TICK Web interface X-Header: ${COL_GREEN}${dashboard}${COL_NC}"
|
||||||
|
@ -1274,7 +1276,7 @@ analyze_gravity_list() {
|
||||||
|
|
||||||
# if users want to check database integrity
|
# if users want to check database integrity
|
||||||
if [[ "${CHECK_DATABASE}" = true ]]; then
|
if [[ "${CHECK_DATABASE}" = true ]]; then
|
||||||
database_integrity_check "${PIHOLE_FTL_DB_FILE}"
|
database_integrity_check "${PIHOLE_GRAVITY_DB_FILE}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
show_db_entries "Info table" "SELECT property,value FROM info" "20 40"
|
show_db_entries "Info table" "SELECT property,value FROM info" "20 40"
|
||||||
|
@ -1337,16 +1339,6 @@ database_integrity_check(){
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
check_database_integrity() {
|
|
||||||
echo_current_diagnostic "Gravity Database"
|
|
||||||
database_permissions "${PIHOLE_GRAVITY_DB_FILE}"
|
|
||||||
database_integrity_check "${PIHOLE_GRAVITY_DB_FILE}"
|
|
||||||
|
|
||||||
echo_current_diagnostic "Pi-hole FTL Query Database"
|
|
||||||
database_permissions "${PIHOLE_FTL_DB_FILE}"
|
|
||||||
database_integrity_check "${PIHOLE_FTL_DB_FILE}"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Show a text spinner during a long process run
|
# Show a text spinner during a long process run
|
||||||
spinner(){
|
spinner(){
|
||||||
# Show the spinner only if there is a tty
|
# Show the spinner only if there is a tty
|
||||||
|
|
|
@ -84,4 +84,9 @@ else
|
||||||
FTL_VERSION="$(pihole-FTL version)"
|
FTL_VERSION="$(pihole-FTL version)"
|
||||||
addOrEditKeyValPair "${VERSION_FILE}" "FTL_VERSION" "${FTL_VERSION}"
|
addOrEditKeyValPair "${VERSION_FILE}" "FTL_VERSION" "${FTL_VERSION}"
|
||||||
|
|
||||||
|
# PIHOLE_DOCKER_TAG is set as env variable only on docker installations
|
||||||
|
if [[ "${PIHOLE_DOCKER_TAG}" ]]; then
|
||||||
|
addOrEditKeyValPair "${VERSION_FILE}" "DOCKER_VERSION" "${PIHOLE_DOCKER_TAG}"
|
||||||
|
fi
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -32,6 +32,8 @@ server.errorlog = "/var/log/lighttpd/error-pihole.log"
|
||||||
server.pid-file = "/run/lighttpd.pid"
|
server.pid-file = "/run/lighttpd.pid"
|
||||||
server.username = "www-data"
|
server.username = "www-data"
|
||||||
server.groupname = "www-data"
|
server.groupname = "www-data"
|
||||||
|
# For lighttpd version 1.4.46 or above, the port can be overwritten in `/etc/lighttpd/external.conf` using the := operator
|
||||||
|
# e.g. server.port := 8000
|
||||||
server.port = 80
|
server.port = 80
|
||||||
accesslog.filename = "/var/log/lighttpd/access-pihole.log"
|
accesslog.filename = "/var/log/lighttpd/access-pihole.log"
|
||||||
accesslog.format = "%{%s}t|%V|%r|%s|%b"
|
accesslog.format = "%{%s}t|%V|%r|%s|%b"
|
||||||
|
|
|
@ -33,6 +33,8 @@ server.errorlog = "/var/log/lighttpd/error-pihole.log"
|
||||||
server.pid-file = "/run/lighttpd.pid"
|
server.pid-file = "/run/lighttpd.pid"
|
||||||
server.username = "lighttpd"
|
server.username = "lighttpd"
|
||||||
server.groupname = "lighttpd"
|
server.groupname = "lighttpd"
|
||||||
|
# For lighttpd version 1.4.46 or above, the port can be overwritten in `/etc/lighttpd/external.conf` using the := operator
|
||||||
|
# e.g. server.port := 8000
|
||||||
server.port = 80
|
server.port = 80
|
||||||
accesslog.filename = "/var/log/lighttpd/access-pihole.log"
|
accesslog.filename = "/var/log/lighttpd/access-pihole.log"
|
||||||
accesslog.format = "%{%s}t|%V|%r|%s|%b"
|
accesslog.format = "%{%s}t|%V|%r|%s|%b"
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
from setuptools import setup
|
from setuptools import setup
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
|
py_modules=[],
|
||||||
setup_requires=['pytest-runner'],
|
setup_requires=['pytest-runner'],
|
||||||
tests_require=['pytest'],
|
tests_require=['pytest'],
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
[tox]
|
[tox]
|
||||||
envlist = py38
|
envlist = py3
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
whitelist_externals = docker
|
whitelist_externals = docker
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
[tox]
|
[tox]
|
||||||
envlist = py38
|
envlist = py3
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
whitelist_externals = docker
|
whitelist_externals = docker
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
[tox]
|
[tox]
|
||||||
envlist = py38
|
envlist = py3
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
whitelist_externals = docker
|
whitelist_externals = docker
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
[tox]
|
[tox]
|
||||||
envlist = py38
|
envlist = py3
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
whitelist_externals = docker
|
whitelist_externals = docker
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
[tox]
|
[tox]
|
||||||
envlist = py38
|
envlist = py3
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
whitelist_externals = docker
|
whitelist_externals = docker
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
[tox]
|
[tox]
|
||||||
envlist = py38
|
envlist = py3
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
whitelist_externals = docker
|
whitelist_externals = docker
|
||||||
|
|
Loading…
Reference in a new issue