aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2021-05-07 08:06:44 +0300
committerSergey Poznyakoff <gray@gnu.org>2021-05-07 08:06:44 +0300
commitb2bd585689c58acce2bcb6b2ad34ce8b2e4761e5 (patch)
treeeba5d638efb5a25e82d58ab8bc1f02b3c2ec3ff1
parent69dd1ad588cc2a4f17a98f292d9340711520b87e (diff)
downloadacmeman-b2bd585689c58acce2bcb6b2ad34ce8b2e4761e5.tar.gz
acmeman-b2bd585689c58acce2bcb6b2ad34ce8b2e4761e5.tar.bz2
Allow for multiple per-domain postrenew statements.
* lib/App/Acmeman.pm (renew): Iterate over the list of postrenew statements. * lib/App/Acmeman/Config.pm: Mark domain.*.postrenew as array.
-rw-r--r--lib/App/Acmeman.pm6
-rw-r--r--lib/App/Acmeman/Config.pm2
2 files changed, 5 insertions, 3 deletions
diff --git a/lib/App/Acmeman.pm b/lib/App/Acmeman.pm
index cbafc05..de3fb99 100644
--- a/lib/App/Acmeman.pm
+++ b/lib/App/Acmeman.pm
@@ -321,12 +321,14 @@ sub renew {
foreach my $vhost ($self->selected_domains) {
if ($self->force_option || $self->domain_cert_expires($vhost)) {
if ($self->register_domain_certificate($vhost)) {
- if (my $cmd = $vhost->postrenew) {
+ if (my @postrenew = $vhost->postrenew) {
local $ENV{ACMEMAN_CERTIFICATE_FILE} =
$vhost->certificate_file;
local $ENV{ACMEMAN_DOMAIN_NAME} = $vhost;
local $ENV{ACMEMAN_ALT_NAMES} = join(' ', $vhost->alt);
- $self->runcmd($cmd, $vhost);
+ foreach my $cmd (@postrenew) {
+ $self->runcmd($cmd, $vhost);
+ }
} else {
push @renewed, $vhost;
}
diff --git a/lib/App/Acmeman/Config.pm b/lib/App/Acmeman/Config.pm
index 6b81a25..f5bce2a 100644
--- a/lib/App/Acmeman/Config.pm
+++ b/lib/App/Acmeman/Config.pm
@@ -143,7 +143,7 @@ __DATA__
alt = STRING :array
files = STRING
key-size = NUMBER
- postrenew = STRING
+ postrenew = STRING :array

Return to:

Send suggestions and report system problems to the System administrator.