From: Michael Tremer Date: Sat, 6 Dec 2025 18:03:57 +0000 (+0000) Subject: dnsbl: Add a command to update all lists X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=330112af683a0e35effd7c7eb5c8ee60fadee1a1;p=dbl.git dnsbl: Add a command to update all lists Signed-off-by: Michael Tremer --- diff --git a/src/scripts/dnsbl.in b/src/scripts/dnsbl.in index 1ff769d..4b767be 100644 --- a/src/scripts/dnsbl.in +++ b/src/scripts/dnsbl.in @@ -83,6 +83,10 @@ class CLI(object): update.add_argument("list", help=_("The name of the list")) update.set_defaults(func=self.__update) + # update-all + update_all = subparsers.add_parser("update-all", help=_("Updates all lists")) + update_all.set_defaults(func=self.__update_all) + # export export = subparsers.add_parser("export", help=_("Exports a list")) export.add_argument("list", help=_("The name of the list")) @@ -228,6 +232,13 @@ class CLI(object): # Update! list.update() + def __update_all(self, backend, args): + """ + Updates all lists + """ + for list in backend.lists: + list.update() + def __export(self, backend, args): """ Exports a list