|
|
|
@ -7,12 +7,17 @@ use List::MoreUtils qw(uniq); |
|
|
|
|
my $d = esmith::DomainsDB->open_ro || die "Couldn't open DomainsDB\n"; |
|
|
|
|
my $h = esmith::HostsDB->open_ro || die "Couldn't open HostsDB\n"; |
|
|
|
|
|
|
|
|
|
my @names = ( "$DomainName" ); |
|
|
|
|
my @names = (); |
|
|
|
|
|
|
|
|
|
foreach my $domain ($d->domains, $d->get_all_by_prop(type => 'vhost')){ |
|
|
|
|
next if ($domain->key eq $DomainName); |
|
|
|
|
my $le = $domain->prop('Letsencrypt') || 'enabled'; |
|
|
|
|
push @names, $domain->key unless $le ne 'enabled'; |
|
|
|
|
next if ($le ne 'enabled'); |
|
|
|
|
if ($domain->key eq $DomainName){ |
|
|
|
|
unshift @names, $DomainName; |
|
|
|
|
} |
|
|
|
|
else{ |
|
|
|
|
push @names, $domain->key; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
foreach my $host ($h->hosts){ |
|
|
|
|