mirror of
https://github.com/chatmail/relay.git
synced 2026-05-19 20:38:05 +00:00
cmdeploy: write --zonefile to file
This commit is contained in:
@@ -96,7 +96,6 @@ def dns_cmd_options(parser):
|
|||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--zonefile",
|
"--zonefile",
|
||||||
dest="zonefile",
|
dest="zonefile",
|
||||||
action="store_true",
|
|
||||||
help="print the whole zonefile for deploying directly",
|
help="print the whole zonefile for deploying directly",
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -156,7 +155,9 @@ def dns_cmd(args, out):
|
|||||||
.strip()
|
.strip()
|
||||||
)
|
)
|
||||||
if args.zonefile:
|
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
|
return
|
||||||
started_dkim_parsing = False
|
started_dkim_parsing = False
|
||||||
for line in zonefile.splitlines():
|
for line in zonefile.splitlines():
|
||||||
|
|||||||
Reference in New Issue
Block a user