From 336f87770d67fe75a8e1b24e539ae75cc08f29b0 Mon Sep 17 00:00:00 2001 From: missytake Date: Wed, 13 Dec 2023 04:58:51 +0100 Subject: [PATCH] cmdeploy: write --zonefile to file --- cmdeploy/src/cmdeploy/cmdeploy.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cmdeploy/src/cmdeploy/cmdeploy.py b/cmdeploy/src/cmdeploy/cmdeploy.py index c34c82e..444507f 100644 --- a/cmdeploy/src/cmdeploy/cmdeploy.py +++ b/cmdeploy/src/cmdeploy/cmdeploy.py @@ -96,7 +96,6 @@ def dns_cmd_options(parser): parser.add_argument( "--zonefile", dest="zonefile", - action="store_true", help="print the whole zonefile for deploying directly", ) @@ -156,7 +155,9 @@ def dns_cmd(args, out): .strip() ) if args.zonefile: - print(zonefile) + with open(args.zonefile, "w+") as zf: + zf.write(zonefile) + print(f"DNS records successfully written to: {args.zonefile}") return started_dkim_parsing = False for line in zonefile.splitlines():