first fully functional version for vhosts

This commit is contained in:
2016-02-22 11:35:44 -05:00
parent 5c54c53911
commit 31b1b9ba58
6 changed files with 136 additions and 8 deletions

View File

@ -2,13 +2,11 @@
use strict;
use warnings;
use Martnet::DDNS;
my $fh;
open($fh, "dig -t AXFR \@127.0.0.1 private.invalid. |")
|| die "Can't open dig: $!";
my $ddns = Martnet::DDNS->new();
while (<$fh>) {
if (/^(\S+)._vhosts.private.invalid.\s+\d+\s+IN\s+TXT\s+\"(.+)\"$/) {
print $1, ". master: ", $2, "\n";
}
my @vh = $ddns->getvhosts();
foreach my $i (sort {$a->{zone} cmp $b->{zone}} @vh) {
print $i->{zone}, ". master: ", $i->{master},"\n";
}