mirror of
https://github.com/pi-hole/pi-hole
synced 2025-01-03 12:40:56 +00:00
Remove detect_pihole_blocking_status() as we can modify the database at any time
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
parent
d7ee44960e
commit
ee20164207
18
gravity.sh
18
gravity.sh
@ -160,20 +160,6 @@ gravity_store_in_database() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Determine if Pi-hole blocking is disabled
|
|
||||||
# If this is the case, we want to update
|
|
||||||
# gravity.list.bck and black.list.bck instead of
|
|
||||||
# gravity.list and black.list
|
|
||||||
detect_pihole_blocking_status() {
|
|
||||||
if [[ "${BLOCKING_ENABLED}" == false ]]; then
|
|
||||||
echo -e " ${INFO} Pi-hole blocking is disabled"
|
|
||||||
adList="${adList}.bck"
|
|
||||||
blackList="${blackList}.bck"
|
|
||||||
else
|
|
||||||
echo -e " ${INFO} Pi-hole blocking is enabled"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# Determine if DNS resolution is available before proceeding
|
# Determine if DNS resolution is available before proceeding
|
||||||
gravity_CheckDNSResolutionAvailable() {
|
gravity_CheckDNSResolutionAvailable() {
|
||||||
local lookupDomain="pi.hole"
|
local lookupDomain="pi.hole"
|
||||||
@ -235,7 +221,7 @@ gravity_GetBlocklistUrls() {
|
|||||||
echo -e " ${INFO} ${COL_BOLD}Neutrino emissions detected${COL_NC}..."
|
echo -e " ${INFO} ${COL_BOLD}Neutrino emissions detected${COL_NC}..."
|
||||||
|
|
||||||
if [[ -f "${adListDefault}" ]] && [[ -f "${adListFile}" ]]; then
|
if [[ -f "${adListDefault}" ]] && [[ -f "${adListFile}" ]]; then
|
||||||
# Remove superceded $adListDefault file
|
# Remove superseded $adListDefault file
|
||||||
rm "${adListDefault}" 2> /dev/null || \
|
rm "${adListDefault}" 2> /dev/null || \
|
||||||
echo -e " ${CROSS} Unable to remove ${adListDefault}"
|
echo -e " ${CROSS} Unable to remove ${adListDefault}"
|
||||||
fi
|
fi
|
||||||
@ -758,8 +744,6 @@ if [[ "${forceDelete:-}" == true ]]; then
|
|||||||
echo -e "${OVER} ${TICK} ${str}"
|
echo -e "${OVER} ${TICK} ${str}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
detect_pihole_blocking_status
|
|
||||||
|
|
||||||
# Determine which functions to run
|
# Determine which functions to run
|
||||||
if [[ "${skipDownload}" == false ]]; then
|
if [[ "${skipDownload}" == false ]]; then
|
||||||
# Gravity needs to download blocklists
|
# Gravity needs to download blocklists
|
||||||
|
Loading…
Reference in New Issue
Block a user