Fix indentation in query.sh. No functional change in this commit.

Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
DL6ER 2019-08-22 14:12:58 +02:00
parent 42ccc1ef24
commit 23b688287f
No known key found for this signature in database
GPG key ID: FB60471F0575164A

View file

@ -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