mirror of
https://github.com/pi-hole/pi-hole.git
synced 2025-04-27 01:30:18 +00:00
Fix indentation in query.sh. No functional change in this commit.
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
parent
42ccc1ef24
commit
23b688287f
1 changed files with 45 additions and 43 deletions
|
@ -129,13 +129,15 @@ scanDatabaseTable() {
|
||||||
}
|
}
|
||||||
|
|
||||||
scanRegexDatabaseTable() {
|
scanRegexDatabaseTable() {
|
||||||
local domain list
|
local domain list
|
||||||
domain="${1}"
|
domain="${1}"
|
||||||
list="${2}"
|
list="${2}"
|
||||||
mapfile -t regexList < <(sqlite3 "${gravityDBfile}" "SELECT domain FROM vw_regex_${list}" 2> /dev/null)
|
|
||||||
|
|
||||||
# If we have regexps to process
|
# Query all regex from the corresponding database tables
|
||||||
if [[ "${#regexList[@]}" -ne 0 ]]; then
|
mapfile -t regexList < <(sqlite3 "${gravityDBfile}" "SELECT domain FROM vw_regex_${list}" 2> /dev/null)
|
||||||
|
|
||||||
|
# If we have regexps to process
|
||||||
|
if [[ "${#regexList[@]}" -ne 0 ]]; then
|
||||||
# Split regexps over a new line
|
# Split regexps over a new line
|
||||||
str_regexList=$(printf '%s\n' "${regexList[@]}")
|
str_regexList=$(printf '%s\n' "${regexList[@]}")
|
||||||
# Check domain against regexps
|
# Check domain against regexps
|
||||||
|
@ -162,7 +164,7 @@ if [[ "${#regexList[@]}" -ne 0 ]]; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Scan Whitelist and Blacklist
|
# Scan Whitelist and Blacklist
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue