mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-12-25 14:20:18 +00:00
Merge pull request #1702 from pi-hole/fix/activeDomains
Ensure domains files are not deleted upon w/blist
This commit is contained in:
commit
88b1f0ca7f
1 changed files with 12 additions and 8 deletions
|
@ -181,6 +181,7 @@ gravity_Supernova() {
|
||||||
echo ""
|
echo ""
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
gravity_Blackbody=true
|
||||||
}
|
}
|
||||||
|
|
||||||
# Download specified URL and perform checks on HTTP status and file content
|
# Download specified URL and perform checks on HTTP status and file content
|
||||||
|
@ -554,6 +555,8 @@ gravity_Cleanup() {
|
||||||
rm ${piholeDir}/*.tmp 2> /dev/null
|
rm ${piholeDir}/*.tmp 2> /dev/null
|
||||||
rm /tmp/*.phgpb 2> /dev/null
|
rm /tmp/*.phgpb 2> /dev/null
|
||||||
|
|
||||||
|
# Ensure this function only runs when gravity_Supernova() has completed
|
||||||
|
if [[ "${gravity_Blackbody:-}" == true ]]; then
|
||||||
# Remove any unused .domains files
|
# Remove any unused .domains files
|
||||||
for file in ${piholeDir}/*.${domainsExtension}; do
|
for file in ${piholeDir}/*.${domainsExtension}; do
|
||||||
# If list is not in active array, then remove it
|
# If list is not in active array, then remove it
|
||||||
|
@ -562,6 +565,7 @@ gravity_Cleanup() {
|
||||||
echo -e " ${CROSS} Failed to remove ${file##*/}"
|
echo -e " ${CROSS} Failed to remove ${file##*/}"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
echo -e "${OVER} ${TICK} ${str}"
|
echo -e "${OVER} ${TICK} ${str}"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue