From e01302b764d50182925e945cb5b69d97284edaff Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Thu, 7 May 2020 21:47:53 +0200 Subject: [PATCH] api acme: reduce after validation-request delay, print status on err Signed-off-by: Thomas Lamprecht --- PVE/API2/ACME.pm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/PVE/API2/ACME.pm b/PVE/API2/ACME.pm index 0389f373..c7d6e7e9 100644 --- a/PVE/API2/ACME.pm +++ b/PVE/API2/ACME.pm @@ -85,19 +85,19 @@ my $order_certificate = sub { if !defined($data->{url}); $acme->request_challenge_validation($data->{url}); - print "Sleeping for 10 seconds\n"; - sleep 10; + print "Sleeping for 5 seconds\n"; + sleep 5; while (1) { $auth = $acme->get_authorization($auth_url); if ($auth->{status} eq 'pending') { - print "Status is still 'pending', trying again in 20 seconds\n"; - sleep 20; + print "Status is still 'pending', trying again in 10 seconds\n"; + sleep 10; next; } elsif ($auth->{status} eq 'valid') { print "Status is 'valid', domain '$domain' OK!\n"; last; } - die "validating challenge '$auth_url' failed\n"; + die "validating challenge '$auth_url' failed - status: $auth->{status}\n"; } }; my $err = $@;