From cf96333f22f91cea667d3c3dd267bc71db4292a9 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Sat, 23 Jan 2016 18:14:18 +0100 Subject: [PATCH] Make sure main domain is the first listed --- root/etc/e-smith/templates/etc/letsencrypt.sh/domains.txt/10domains | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/root/etc/e-smith/templates/etc/letsencrypt.sh/domains.txt/10domains b/root/etc/e-smith/templates/etc/letsencrypt.sh/domains.txt/10domains index e6d4c20..d8e690f 100644 --- a/root/etc/e-smith/templates/etc/letsencrypt.sh/domains.txt/10domains +++ b/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'; }