parent
fe296869b3
commit
ded0c3eb5e
25 changed files with 64 additions and 34 deletions
@ -0,0 +1,26 @@ |
||||
{ |
||||
my $ssl = $DB->get('modSSL'); |
||||
my $crt = $ssl->prop('crt'); |
||||
my $key = $ssl->prop('key'); |
||||
my $chain = $ssl->prop('CertificateChainFile'); |
||||
return unless ( |
||||
defined $crt && |
||||
defined $key && |
||||
defined $chain |
||||
); |
||||
|
||||
my ($new_crt, $new_key, $new_chain) = ($crt, $key, $chain); |
||||
$new_crt =~ s|/home/e-smith/db/letsencrypt\.sh|/home/e-smith/db/dehydrated|; |
||||
$new_key =~ s|/home/e-smith/db/letsencrypt\.sh|/home/e-smith/db/dehydrated|; |
||||
$new_chain =~ s|/home/e-smith/db/letsencrypt\.sh|/home/e-smith/db/dehydrated|; |
||||
|
||||
return unless ( |
||||
$crt ne $new_crt && |
||||
$key ne $new_key && |
||||
$chain ne $new_chain |
||||
); |
||||
|
||||
$ssl->set_prop('crt', $crt); |
||||
$ssl->set_prop('key', $key); |
||||
$ssl->set_prop('CertificateChainFile', $new_chain); |
||||
} |
@ -0,0 +1,11 @@ |
||||
{ |
||||
|
||||
if (($letsencrypt{'status'} || 'disabled') eq 'enabled'){ |
||||
$OUT .= 'sleep $[ $RANDOM % 3600 ];' . "\n"; |
||||
$OUT .= "/sbin/e-smith/dehydrated -c 2>&1 | awk '{ print strftime(), \$0; fflush(); }' >> /var/log/dehydrated.log\n"; |
||||
if (($letsencrypt{'RevokeOldCertificates'} || 'disabled') =~ m/^enabled|on|yes|1$/){ |
||||
$OUT .= "/usr/bin/dehydrated_revoke 2>&1 | awk '{ print strftime(), \$0; fflush(); }' >> /var/log/dehydrated.log\n"; |
||||
} |
||||
} |
||||
|
||||
} |
@ -1,11 +0,0 @@ |
||||
{ |
||||
|
||||
if (($letsencrypt{'status'} || 'disabled') eq 'enabled'){ |
||||
$OUT .= 'sleep $[ $RANDOM % 3600 ];' . "\n"; |
||||
$OUT .= "/sbin/e-smith/letsencrypt.sh -c 2>&1 | awk '{ print strftime(), \$0; fflush(); }' >> /var/log/letsencrypt.sh.log\n"; |
||||
if (($letsencrypt{'RevokeOldCertificates'} || 'disabled') =~ m/^enabled|on|yes|1$/){ |
||||
$OUT .= "/usr/bin/le_revoke.sh 2>&1 | awk '{ print strftime(), \$0; fflush(); }' >> /var/log/letsencrypt.sh.log\n"; |
||||
} |
||||
} |
||||
|
||||
} |
@ -0,0 +1,2 @@ |
||||
BASEDIR=/home/e-smith/db/dehydrated/ |
||||
DOMAINS_TXT=/etc/dehydrated/domains.txt |
@ -1,4 +1,4 @@ |
||||
Alias /.well-known/acme-challenge/ /var/lib/letsencrypt.sh/challenges/ |
||||
Alias /.well-known/acme-challenge/ /var/lib/dehydrated/challenges/ |
||||
<Location /.well-known/acme-challenge/> |
||||
Allow from all |
||||
</Location> |
||||
|
@ -1,4 +1,4 @@ |
||||
Alias /.well-known/acme-challenge/ /var/lib/letsencrypt.sh/challenges/ |
||||
Alias /.well-known/acme-challenge/ /var/lib/dehydrated/challenges/ |
||||
<Location /.well-known/acme-challenge/> |
||||
Allow from all |
||||
</Location> |
||||
|
@ -1,2 +0,0 @@ |
||||
BASEDIR=/home/e-smith/db/letsencrypt.sh/ |
||||
DOMAINS_TXT=/etc/letsencrypt.sh/domains.txt |
Loading…
Reference in new issue