mirror of
https://github.com/pi-hole/pi-hole
synced 2025-01-03 12:40:56 +00:00
Add some output to the --nuke command
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
This commit is contained in:
parent
bd982c6f94
commit
cd8120d33f
@ -231,7 +231,14 @@ Displaylist() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
NukeList() {
|
NukeList() {
|
||||||
|
count=$(sqlite3 "${gravityDBfile}" "SELECT COUNT(1) FROM domainlist WHERE type = ${typeId};")
|
||||||
|
listname="$(GetListnameFromTypeId "${typeId}")"
|
||||||
|
if [ "$count" -gt 0 ];then
|
||||||
sqlite3 "${gravityDBfile}" "DELETE FROM domainlist WHERE type = ${typeId};"
|
sqlite3 "${gravityDBfile}" "DELETE FROM domainlist WHERE type = ${typeId};"
|
||||||
|
echo " ${TICK} Removed ${count} domain(s) from the ${listname}"
|
||||||
|
else
|
||||||
|
echo " ${INFO} ${listname} already empty. Nothing to do!"
|
||||||
|
fi
|
||||||
exit 0;
|
exit 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user