mirror of
https://github.com/pi-hole/pi-hole.git
synced 2025-04-07 19:55:09 +02:00
In ./advanced/Scripts/database_migration/gravity-db.sh line 18:
piholeDir="${2}" ^-------^ SC2034 (warning): piholeDir appears unused. Verify use (or export if used externally). Turns out it is _actually_ unused, the full path of the gravity database is passed to the function, so we'll tidy this up rather than supressing. Signed-off-by: Adam Warner <me@adamwarner.co.uk>
This commit is contained in:
parent
a624d3be8d
commit
59d2177271
@ -13,9 +13,8 @@
|
||||
readonly scriptPath="/etc/.pihole/advanced/Scripts/database_migration/gravity"
|
||||
|
||||
upgrade_gravityDB(){
|
||||
local database piholeDir version
|
||||
local database version
|
||||
database="${1}"
|
||||
piholeDir="${2}"
|
||||
|
||||
# Exit early if the database does not exist (e.g. in CI tests)
|
||||
if [[ ! -f "${database}" ]]; then
|
||||
|
@ -306,7 +306,7 @@ migrate_to_database() {
|
||||
fi
|
||||
|
||||
# Check if gravity database needs to be updated
|
||||
upgrade_gravityDB "${gravityDBfile}" "${piholeDir}"
|
||||
upgrade_gravityDB "${gravityDBfile}"
|
||||
|
||||
# Migrate list files to new database
|
||||
if [ -e "${adListFile}" ]; then
|
||||
@ -334,7 +334,7 @@ migrate_to_database() {
|
||||
fi
|
||||
|
||||
# Check if gravity database needs to be updated
|
||||
upgrade_gravityDB "${gravityDBfile}" "${piholeDir}"
|
||||
upgrade_gravityDB "${gravityDBfile}"
|
||||
}
|
||||
|
||||
# Determine if DNS resolution is available before proceeding
|
||||
@ -1100,7 +1100,7 @@ for var in "$@"; do
|
||||
"-t" | "--timeit") timed=true ;;
|
||||
"-r" | "--repair") repairSelector "$3" ;;
|
||||
"-u" | "--upgrade")
|
||||
upgrade_gravityDB "${gravityDBfile}" "${piholeDir}"
|
||||
upgrade_gravityDB "${gravityDBfile}"
|
||||
exit 0
|
||||
;;
|
||||
"-h" | "--help") helpFunc ;;
|
||||
|
Loading…
x
Reference in New Issue
Block a user