1
0
mirror of https://github.com/pi-hole/pi-hole synced 2024-12-22 14:58:08 +00:00

Add support for comments and blank lines in adlists.default/adlists.list

This commit is contained in:
Promofaux 2016-02-21 17:45:25 +00:00
parent 4a1e88f4bf
commit bffc77e478

View File

@ -100,7 +100,12 @@ function gravity_collapse() {
echo -n "::: Custom adList file detected. Reading..."
sources=()
while read -a line; do
sources+=($line)
#Do not read commented out or blank lines
if [[ $line = \#* ]] || [[ ! $line ]]; then
echo "" > /dev/null
else
sources+=($line)
fi
done < $adListFile
echo " done!"
else
@ -108,7 +113,12 @@ function gravity_collapse() {
echo -n "::: No custom adlist file detected, reading from default file..."
sources=()
while read -a line; do
sources+=($line)
#Do not read commented out or blank lines
if [[ $line = \#* ]] || [[ ! $line ]]; then
echo "" > /dev/null
else
sources+=($line)
fi
done < $adListDefault
echo " done!"
fi