mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-12-25 06:10:20 +00:00
Merge pull request #3847 from pi-hole/fix/nuke
Add some output to the --nuke command
This commit is contained in:
commit
c64b96e2a8
1 changed files with 8 additions and 1 deletions
|
@ -231,7 +231,14 @@ Displaylist() {
|
|||
}
|
||||
|
||||
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};"
|
||||
echo " ${TICK} Removed ${count} domain(s) from the ${listname}"
|
||||
else
|
||||
echo " ${INFO} ${listname} already empty. Nothing to do!"
|
||||
fi
|
||||
exit 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue