We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bd982c6 commit cd8120dCopy full SHA for cd8120d
1 file changed
advanced/Scripts/list.sh
@@ -231,7 +231,14 @@ Displaylist() {
231
}
232
233
NukeList() {
234
- sqlite3 "${gravityDBfile}" "DELETE FROM domainlist WHERE type = ${typeId};"
+ count=$(sqlite3 "${gravityDBfile}" "SELECT COUNT(1) FROM domainlist WHERE type = ${typeId};")
235
+ listname="$(GetListnameFromTypeId "${typeId}")"
236
+ if [ "$count" -gt 0 ];then
237
+ sqlite3 "${gravityDBfile}" "DELETE FROM domainlist WHERE type = ${typeId};"
238
+ echo " ${TICK} Removed ${count} domain(s) from the ${listname}"
239
+ else
240
+ echo " ${INFO} ${listname} already empty. Nothing to do!"
241
+ fi
242
exit 0;
243
244
0 commit comments