Rename adlists -> adlist table.

Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
DL6ER
2019-06-30 23:21:10 +02:00
parent 3a14e8b013
commit f91421418a
2 changed files with 17 additions and 17 deletions

View File

@@ -111,7 +111,7 @@ database_table_from_file() {
# No need to modify the input data for the gravity table
inputfile="${source}"
else
# Apply format for white-, blacklist, regex, and adlists tables
# Apply format for white-, blacklist, regex, and adlist tables
local rowid
declare -i rowid
rowid=1
@@ -159,9 +159,9 @@ migrate_to_database() {
# Migrate list files to new database
if [[ -e "${adListFile}" ]]; then
# Store adlists domains in database
# Store adlist domains in database
echo -e " ${INFO} Migrating content of ${adListFile} into new database"
database_table_from_file "adlists" "${adListFile}"
database_table_from_file "adlist" "${adListFile}"
fi
if [[ -e "${blacklistFile}" ]]; then
# Store blacklisted domains in database
@@ -236,13 +236,13 @@ gravity_CheckDNSResolutionAvailable() {
gravity_CheckDNSResolutionAvailable
}
# Retrieve blocklist URLs and parse domains from adlists.list
# Retrieve blocklist URLs and parse domains from adlist.list
gravity_GetBlocklistUrls() {
echo -e " ${INFO} ${COL_BOLD}Neutrino emissions detected${COL_NC}..."
# Retrieve source URLs from gravity database
# We source only enabled adlists, sqlite3 stores boolean values as 0 (false) or 1 (true)
mapfile -t sources <<< "$(sqlite3 "${gravityDBfile}" "SELECT address FROM vw_adlists;" 2> /dev/null)"
mapfile -t sources <<< "$(sqlite3 "${gravityDBfile}" "SELECT address FROM vw_adlist;" 2> /dev/null)"
# Parse source domains from $sources
mapfile -t sourceDomains <<< "$(