Commit 14309926 authored by Leigh B Stoller's avatar Leigh B Stoller
Browse files

Allow for a certbot fragment file to be included.

parent e4f7fb2f
......@@ -533,6 +533,7 @@ sub assemble_zonefile($) {
my $mapfilehead = "$mapfile.head";
my $mapfiletail = "$mapfile.tail";
my $mapfilefrag = "$mapfile.local";
my $mapfilecert = "$mapfile.certbot";
#
# Concat the head and tail files to create the new map.
......@@ -586,6 +587,17 @@ sub assemble_zonefile($) {
system("echo '; End of local fragment; $mapfilefrag' >> $mapfile");
system("echo '' >> $mapfile");
}
# This is for certbot DNS renew
if (-e $mapfilecert) {
system("echo '' >> $mapfile");
system("echo ';' >> $mapfile");
system("echo '; This is a local fragment; $mapfilecert' >> $mapfile");
system("echo ';' >> $mapfile");
system("cat $mapfilecert >> $mapfile") == 0 or
fatal("Failed to concat $mapfilecert to $mapfile\n");
system("echo '; End of local fragment; $mapfilecert' >> $mapfile");
system("echo '' >> $mapfile");
}
#
# Now the tail of the map.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment