Make sure main domain is the first listed

tags/smeserver-letsencrypt-client-0.2.4-1
Daniel Berteaud 9 years ago
parent 051e021fdd
commit cf96333f22
  1. 3
      root/etc/e-smith/templates/etc/letsencrypt.sh/domains.txt/10domains

@ -6,9 +6,10 @@ use esmith::HostsDB;
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 = ();
my @names = ( "$DomainName" );
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';
}

Loading…
Cancel
Save