Update pialert_update.sh

This commit is contained in:
pucherot
2021-02-02 10:14:38 +01:00
committed by GitHub
parent f8014f1bf4
commit 228078c07b

View File

@@ -139,6 +139,9 @@ update_db() {
sudo chgrp -R www-data $PIALERT_HOME/db 2>&1 >> "$LOG"
chmod -R 770 $PIALERT_HOME/db 2>&1 >> "$LOG"
print_msg "- Installing sqlite3..."
sudo apt-get install sqlite3 -y 2>&1 >> "$LOG"
print_msg "- Checking 'Parameters' table..."
TAB=`sqlite3 $PIALERT_HOME/db/pialert.db "SELECT COUNT(*) FROM sqlite_master WHERE type='table' AND name='Parameters' COLLATE NOCASE;"` 2>&1 >> "$LOG"
if [ "$TAB" == "0" ] ; then