]> git.ipfire.org Git - dbl.git/commitdiff
dnsbl: Add a command to update all lists
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 6 Dec 2025 18:03:57 +0000 (18:03 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 6 Dec 2025 18:03:57 +0000 (18:03 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/scripts/dnsbl.in

index 1ff769d101b04d093e28f9c3555949f7cb616431..4b767be90c3695ccb0638f59955104c2859a0825 100644 (file)
@@ -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