fixes for paths in /var
This commit is contained in:
@ -12,7 +12,7 @@ my @vh = $ddns->get('_vhosts');
|
|||||||
# For each virtual host, generate a vhost zone file if there isn't one
|
# For each virtual host, generate a vhost zone file if there isn't one
|
||||||
my $changecount = 0;
|
my $changecount = 0;
|
||||||
foreach my $i (@vh) {
|
foreach my $i (@vh) {
|
||||||
my $zf = "/var/lib/bind/bind/vhost/db.$i->{zone}";
|
my $zf = "/var/lib/bind/vhost/db.$i->{zone}";
|
||||||
unless ( -f $zf ) {
|
unless ( -f $zf ) {
|
||||||
print "Generating new zone file for $i->{zone}\n";
|
print "Generating new zone file for $i->{zone}\n";
|
||||||
open(my $fh, ">", $zf)
|
open(my $fh, ">", $zf)
|
||||||
|
|||||||
@ -6,6 +6,7 @@ use Martnet::DDNS;
|
|||||||
|
|
||||||
my $ddns = Martnet::DDNS->new();
|
my $ddns = Martnet::DDNS->new();
|
||||||
|
|
||||||
|
my $cfgpath = '/etc/bind';
|
||||||
my $datapath = '/var/lib/bind';
|
my $datapath = '/var/lib/bind';
|
||||||
|
|
||||||
my %files = ( 'custom.zones.9' => '_custom',
|
my %files = ( 'custom.zones.9' => '_custom',
|
||||||
@ -21,7 +22,7 @@ our %fixes = ( '_custom' => 'add-custom',
|
|||||||
);
|
);
|
||||||
|
|
||||||
foreach my $i (keys %files) {
|
foreach my $i (keys %files) {
|
||||||
validate_file($datapath . '/' . $i, $files{$i});
|
validate_file($cfgpath . '/' . $i, $files{$i});
|
||||||
}
|
}
|
||||||
|
|
||||||
exit 0;
|
exit 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user