mirror of
https://github.com/pi-hole/pi-hole.git
synced 2025-01-12 15:04:44 +00:00
Exit early if the database does not exist (e.g. in some CI tests)
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
parent
8e8c7ecad2
commit
1b87ec067e
1 changed files with 5 additions and 0 deletions
|
@ -18,6 +18,11 @@ upgrade_gravityDB(){
|
||||||
piholeDir="${2}"
|
piholeDir="${2}"
|
||||||
auditFile="${piholeDir}/auditlog.list"
|
auditFile="${piholeDir}/auditlog.list"
|
||||||
|
|
||||||
|
# Exit early if the database does not exist (e.g. in CI tests)
|
||||||
|
if [[ ! -f "${database}" ]]; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
# Get database version
|
# Get database version
|
||||||
version="$(pihole-FTL sqlite3 -ni "${database}" "SELECT \"value\" FROM \"info\" WHERE \"property\" = 'version';")"
|
version="$(pihole-FTL sqlite3 -ni "${database}" "SELECT \"value\" FROM \"info\" WHERE \"property\" = 'version';")"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue