mirror of https://github.com/Zelo72/rpi
2020.10.03-21:08:00
This commit is contained in:
parent
a291388a05
commit
031e785233
|
@ -0,0 +1,19 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [ -z "$1" ]; then
|
||||
echo "Es wurde kein Ausgabeverzeichnis angegeben!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -d "$1" ]; then
|
||||
echo "Ausgabeverzeichnis $1 existiert nicht!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
exportFile=$1/TopDomainsBlocked.txt
|
||||
|
||||
echo "Exportiere geblocke Doamins ..."
|
||||
|
||||
sqlite3 /etc/pihole/pihole-FTL.db "SELECT domain, count(domain) FROM queries WHERE status NOT IN(2,3) GROUP BY domain ORDER BY count(domain) DESC;" >"$exportFile"
|
||||
|
||||
echo "Export nach $exportFile abgeschlossen"
|
Loading…
Reference in New Issue