From 7167e6d5e42869f8ab370565ae4517cef3b6821e Mon Sep 17 00:00:00 2001 From: DL6ER Date: Tue, 21 Dec 2021 16:20:02 +0100 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Dan Schaper --- gravity.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gravity.sh b/gravity.sh index bd2ae909..b1ecdc08 100755 --- a/gravity.sh +++ b/gravity.sh @@ -851,6 +851,7 @@ gravity_Cleanup() { database_recovery() { local result local str="Checking integrity of existing gravity database" + local option="${1}" echo -ne " ${INFO} ${str}..." if result="$(pihole-FTL sqlite3 "${gravityDBfile}" "PRAGMA integrity_check" 2>&1)"; then echo -e "${OVER} ${TICK} ${str} - no errors found" @@ -859,7 +860,7 @@ database_recovery() { echo -ne " ${INFO} ${str}..." if result="$(pihole-FTL sqlite3 "${gravityDBfile}" "PRAGMA foreign_key_check" 2>&1)"; then echo -e "${OVER} ${TICK} ${str} - no errors found" - if [[ $1 != "force" ]]; then + if [[ "${option}" != "force" ]]; then return fi else