mirror of
https://github.com/pi-hole/pi-hole
synced 2025-01-03 04:30:55 +00:00
Apply suggestions from code review
Co-authored-by: Dan Schaper <dan.schaper@pi-hole.net>
This commit is contained in:
parent
b06efb6ab7
commit
7167e6d5e4
@ -851,6 +851,7 @@ gravity_Cleanup() {
|
|||||||
database_recovery() {
|
database_recovery() {
|
||||||
local result
|
local result
|
||||||
local str="Checking integrity of existing gravity database"
|
local str="Checking integrity of existing gravity database"
|
||||||
|
local option="${1}"
|
||||||
echo -ne " ${INFO} ${str}..."
|
echo -ne " ${INFO} ${str}..."
|
||||||
if result="$(pihole-FTL sqlite3 "${gravityDBfile}" "PRAGMA integrity_check" 2>&1)"; then
|
if result="$(pihole-FTL sqlite3 "${gravityDBfile}" "PRAGMA integrity_check" 2>&1)"; then
|
||||||
echo -e "${OVER} ${TICK} ${str} - no errors found"
|
echo -e "${OVER} ${TICK} ${str} - no errors found"
|
||||||
@ -859,7 +860,7 @@ database_recovery() {
|
|||||||
echo -ne " ${INFO} ${str}..."
|
echo -ne " ${INFO} ${str}..."
|
||||||
if result="$(pihole-FTL sqlite3 "${gravityDBfile}" "PRAGMA foreign_key_check" 2>&1)"; then
|
if result="$(pihole-FTL sqlite3 "${gravityDBfile}" "PRAGMA foreign_key_check" 2>&1)"; then
|
||||||
echo -e "${OVER} ${TICK} ${str} - no errors found"
|
echo -e "${OVER} ${TICK} ${str} - no errors found"
|
||||||
if [[ $1 != "force" ]]; then
|
if [[ "${option}" != "force" ]]; then
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user