Create blacklist.txt if not existant

Closes: https://github.com/pi-hole/pi-hole/issues/1888

Signed-off-by: Ludovic Rousseau <ludovic.rousseau@free.fr>
This commit is contained in:
Ludovic Rousseau 2018-02-18 13:00:56 +01:00
parent 1e87850952
commit b7891f92a5
1 changed files with 5 additions and 0 deletions

View File

@ -84,6 +84,11 @@ PoplistFile() {
touch ${whitelist}
fi
# Check blacklist file exists, and if not, create it
if [[ ! -f ${blacklist} ]]; then
touch ${blacklist}
fi
for dom in "${domList[@]}"; do
# Logic: If addmode then add to desired list and remove from the other; if delmode then remove from desired list but do not add to the other
if ${addmode}; then