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>
pull/2356/head
DL6ER 6 years ago
parent 20b946eae5
commit 6cde066edd
No known key found for this signature in database
GPG Key ID: 00135ACBD90B28DD

@ -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…
Cancel
Save