mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 02:42:58 +00:00
Address linting errors.
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
parent
acc50b709e
commit
be3e198f9a
2 changed files with 7 additions and 4 deletions
|
@ -11,13 +11,15 @@
|
|||
# Please see LICENSE file for your rights under this license.
|
||||
|
||||
upgrade_gravityDB(){
|
||||
local version
|
||||
version="$(sqlite3 "$1" "SELECT \"value\" FROM \"info\" WHERE \"property\" = 'version';")"
|
||||
local database auditFile version
|
||||
database="${1}"
|
||||
auditFile="${2}"
|
||||
version="$(sqlite3 "${database}" "SELECT \"value\" FROM \"info\" WHERE \"property\" = 'version';")"
|
||||
|
||||
if [[ "$version" == "1" ]]; then
|
||||
# This migration script upgrades the gravity.db file by
|
||||
# adding the domain_auditlist table
|
||||
sqlite3 "$1" < "/etc/.pihole/advanced/Scripts/database_migration/gravity/1_to_2.sql"
|
||||
sqlite3 "${database}" < "/etc/.pihole/advanced/Scripts/database_migration/gravity/1_to_2.sql"
|
||||
version=2
|
||||
|
||||
# Store audit domains in database table
|
||||
|
|
|
@ -17,6 +17,7 @@ coltable="/opt/pihole/COL_TABLE"
|
|||
source "${coltable}"
|
||||
regexconverter="/opt/pihole/wildcard_regex_converter.sh"
|
||||
source "${regexconverter}"
|
||||
# shellcheck disable=SC1091
|
||||
source "/etc/.pihole/advanced/Scripts/database_migration/gravity-db.sh"
|
||||
|
||||
basename="pihole"
|
||||
|
@ -187,7 +188,7 @@ migrate_to_database() {
|
|||
fi
|
||||
|
||||
# Check if gravity database needs to be updated
|
||||
upgrade_gravityDB "${gravityDBfile}"
|
||||
upgrade_gravityDB "${gravityDBfile}" "${auditFile}"
|
||||
}
|
||||
|
||||
# Determine if DNS resolution is available before proceeding
|
||||
|
|
Loading…
Reference in a new issue