mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 02:42:58 +00:00
Don't double check for lines containing no domains in gravity
Signed-off-by: Christian König <ckoenig@posteo.de>
This commit is contained in:
parent
c2bb190dce
commit
4004a93d1a
1 changed files with 1 additions and 3 deletions
|
@ -731,13 +731,11 @@ gravity_ParseFileIntoDomains() {
|
||||||
# 3) Remove comments (text starting with "#", include possible spaces before the hash sign)
|
# 3) Remove comments (text starting with "#", include possible spaces before the hash sign)
|
||||||
# 4) Remove lines containing "/"
|
# 4) Remove lines containing "/"
|
||||||
# 5) Remove leading tabs, spaces, etc.
|
# 5) Remove leading tabs, spaces, etc.
|
||||||
# 6) Delete lines not matching domain names
|
|
||||||
< "${src}" tr -d '\r' | \
|
< "${src}" tr -d '\r' | \
|
||||||
tr '[:upper:]' '[:lower:]' | \
|
tr '[:upper:]' '[:lower:]' | \
|
||||||
sed 's/\s*#.*//g' | \
|
sed 's/\s*#.*//g' | \
|
||||||
sed -r '/(\/).*$/d' | \
|
sed -r '/(\/).*$/d' | \
|
||||||
sed -r 's/^.*\s+//g' | \
|
sed -r 's/^.*\s+//g' > "${destination}"
|
||||||
sed -r '/([^\.]+\.)+[^\.]{2,}/!d' > "${destination}"
|
|
||||||
chmod 644 "${destination}"
|
chmod 644 "${destination}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue