first fully functional version for vhosts
This commit is contained in:
19
DDNS.pm
19
DDNS.pm
@ -98,6 +98,25 @@ sub delvhost {
|
||||
$this->cleanup();
|
||||
}
|
||||
|
||||
sub getvhosts {
|
||||
my ($this) = @_;
|
||||
|
||||
my $fh;
|
||||
open($fh, "dig -t AXFR \@127.0.0.1 private.invalid. |")
|
||||
|| die "Can't open dig: $!";
|
||||
|
||||
my @vh;
|
||||
|
||||
while (<$fh>) {
|
||||
if (/^(\S+)._vhosts.private.invalid.\s+\d+\s+IN\s+TXT\s+\"(.+)\"$/) {
|
||||
push (@vh, { zone => $1,
|
||||
master => $2 });
|
||||
}
|
||||
}
|
||||
|
||||
return @vh;
|
||||
}
|
||||
|
||||
sub cleanup {
|
||||
my ($this) = @_;
|
||||
# Merge the .jnl file in with the domain file
|
||||
|
||||
Reference in New Issue
Block a user