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

Merge pull request #3115 from pi-hole/tweak/gravity_count

Store number of distinct gravity domains in database after counting
This commit is contained in:
DL6ER 2020-02-05 23:25:36 +01:00 committed by GitHub
commit 37a44c0773
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -583,6 +583,7 @@ gravity_Table_Count() {
local unique
unique="$(sqlite3 "${gravityDBfile}" "SELECT COUNT(DISTINCT domain) FROM ${table};")"
echo -e " ${INFO} Number of ${str}: ${num} (${unique} unique domains)"
sqlite3 "${gravityDBfile}" "INSERT OR REPLACE INTO info (property,value) VALUES ('gravity_count',${unique});"
else
echo -e " ${INFO} Number of ${str}: ${num}"
fi