1
0
mirror of https://github.com/pi-hole/pi-hole synced 2025-01-03 12:40:56 +00:00

Flush most recent 24 hours from FTL's database

Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
DL6ER 2018-01-21 13:48:13 +01:00
parent 158ea1d43b
commit 4c249a1186
No known key found for this signature in database
GPG Key ID: 00135ACBD90B28DD

View File

@ -42,8 +42,11 @@ else
fi fi
fi fi
# Delete most recent 24 hours from FTL's database # Delete most recent 24 hours from FTL's database
deleted=$(sqlite3 /etc/pihole/pihole-FTL.db "DELETE FROM queries WHERE timestamp >= strftime('%s','now')-86400; select changes() from queries limit 1")
fi fi
if [[ "$@" != *"quiet"* ]]; then if [[ "$@" != *"quiet"* ]]; then
echo -e "${OVER} ${TICK} Flushed /var/log/pihole.log" echo -e "${OVER} ${TICK} Flushed /var/log/pihole.log"
echo -e " ${TICK} Deleted ${deleted} queries from database"
fi fi