From cfb45ffc581d38ee3c9b35620842536f4ea0d64a Mon Sep 17 00:00:00 2001 From: Jorj Bauer Date: Wed, 15 Jan 2020 11:13:05 -0500 Subject: [PATCH] fixes for paths in /var --- bin/sync-master-vhosts | 2 +- bin/validate-master | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/sync-master-vhosts b/bin/sync-master-vhosts index d9373c8..4c43a20 100755 --- a/bin/sync-master-vhosts +++ b/bin/sync-master-vhosts @@ -12,7 +12,7 @@ my @vh = $ddns->get('_vhosts'); # For each virtual host, generate a vhost zone file if there isn't one my $changecount = 0; 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 ) { print "Generating new zone file for $i->{zone}\n"; open(my $fh, ">", $zf) diff --git a/bin/validate-master b/bin/validate-master index ac5b971..763a694 100755 --- a/bin/validate-master +++ b/bin/validate-master @@ -6,6 +6,7 @@ use Martnet::DDNS; my $ddns = Martnet::DDNS->new(); +my $cfgpath = '/etc/bind'; my $datapath = '/var/lib/bind'; my %files = ( 'custom.zones.9' => '_custom', @@ -21,7 +22,7 @@ our %fixes = ( '_custom' => 'add-custom', ); foreach my $i (keys %files) { - validate_file($datapath . '/' . $i, $files{$i}); + validate_file($cfgpath . '/' . $i, $files{$i}); } exit 0;