Upgrade database if necessary and store audit domains therein.

Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
DL6ER 2019-07-05 14:03:57 +02:00
parent 1dbe6c83c3
commit 4f4a12bb40
No known key found for this signature in database
GPG key ID: 00135ACBD90B28DD
2 changed files with 40 additions and 18 deletions

View file

@ -11,8 +11,8 @@
# Please see LICENSE file for your rights under this license.
upgrade_gravityDB(){
version=$(sqlite3 "$1" "SELECT "value" FROM "info" WHERE "property" = 'version';")
echo $version
local version=$(sqlite3 "$1" "SELECT "value" FROM "info" WHERE "property" = 'version';")
case "$version" in
1)
sqlite3 "$1" < "/etc/.pihole/advanced/Scripts/database_migration/gravity/1_to_2.sql"