mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 02:42:58 +00:00
Have gravity detect the presence of files like gravity.list.bck and update this file if present (assuming blocking is disabled)
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
parent
20b946eae5
commit
6cde066edd
1 changed files with 15 additions and 0 deletions
15
gravity.sh
15
gravity.sh
|
@ -73,6 +73,19 @@ if [[ -r "${piholeDir}/pihole.conf" ]]; then
|
|||
echo -e " ${COL_LIGHT_RED}Ignoring overrides specified within pihole.conf! ${COL_NC}"
|
||||
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 [[ -e "${adList}.bck" ]]; then
|
||||
adList="${adList}.bck"
|
||||
fi
|
||||
if [[ -e "${blackList}.bck" ]]; then
|
||||
blackList="${blackList}.bck"
|
||||
fi
|
||||
}
|
||||
|
||||
# Determine if DNS resolution is available before proceeding
|
||||
gravity_CheckDNSResolutionAvailable() {
|
||||
local lookupDomain="pi.hole"
|
||||
|
@ -621,6 +634,8 @@ if [[ "${forceDelete:-}" == true ]]; then
|
|||
echo -e "${OVER} ${TICK} ${str}"
|
||||
fi
|
||||
|
||||
detect_pihole_blocking_status
|
||||
|
||||
# Determine which functions to run
|
||||
if [[ "${skipDownload}" == false ]]; then
|
||||
# Gravity needs to download blocklists
|
||||
|
|
Loading…
Reference in a new issue