Restart pihole-FTL after log flushing to force reloading history. Fixes #2339

Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
DL6ER 2018-08-14 13:14:39 +02:00
parent 3696373609
commit ca309d3b28
No known key found for this signature in database
GPG key ID: 00135ACBD90B28DD

View file

@ -58,6 +58,8 @@ else
# Delete most recent 24 hours from FTL's database, leave even older data intact (don't wipe out all history) # Delete most recent 24 hours from FTL's database, leave even older data intact (don't wipe out all history)
deleted=$(sqlite3 "${DBFILE}" "DELETE FROM queries WHERE timestamp >= strftime('%s','now')-86400; select changes() from queries limit 1") deleted=$(sqlite3 "${DBFILE}" "DELETE FROM queries WHERE timestamp >= strftime('%s','now')-86400; select changes() from queries limit 1")
# Restart pihole-FTL to force reloading history
sudo pihole restartdns
fi fi
if [[ "$@" != *"quiet"* ]]; then if [[ "$@" != *"quiet"* ]]; then