remove debugging; scripts renamed to omit suffix; added a list for vhosts
This commit is contained in:
2
DDNS.pm
2
DDNS.pm
@ -62,7 +62,7 @@ sub __docmd {
|
||||
close $tmpfh;
|
||||
|
||||
my $fh;
|
||||
open($fh, "|nsupdate -d -k $this->{keyfile} > $filename")
|
||||
open($fh, "|nsupdate -k $this->{keyfile} > $filename")
|
||||
|| die "Can't open nsupdate: $!";
|
||||
|
||||
print $fh "server localhost\nzone private.invalid.\n$cmd\nshow\nsend\n";
|
||||
|
||||
@ -7,8 +7,9 @@ WriteMakefile(
|
||||
File::Temp => 0.2304,
|
||||
Regexp::Common => 2013031301,
|
||||
},
|
||||
'EXE_FILES' => [ 'bin/addvhost.pl',
|
||||
'bin/delvhost.pl',
|
||||
'EXE_FILES' => [ 'bin/addvhost',
|
||||
'bin/delvhost',
|
||||
'bin/listvhosts',
|
||||
],
|
||||
'AUTHOR' => 'Jorj Bauer <jorj@jorj.org>',
|
||||
);
|
||||
|
||||
14
bin/list-vhosts
Executable file
14
bin/list-vhosts
Executable file
@ -0,0 +1,14 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
my $fh;
|
||||
open($fh, "dig -t AXFR \@127.0.0.1 private.invalid. |")
|
||||
|| die "Can't open dig: $!";
|
||||
|
||||
while (<$fh>) {
|
||||
if (/^(\S+)._vhosts.private.invalid.\s+\d+\s+IN\s+TXT\s+\"(.+)\"$/) {
|
||||
print $1, ". master: ", $2, "\n";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user