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