mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-05 01:26:39 +00:00
api acme: reduce after validation-request delay, print status on err
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
ffc65752f2
commit
e01302b764
@ -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 = $@;
|
||||
|
Loading…
Reference in New Issue
Block a user