mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-07 02:23:23 +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});
|
if !defined($data->{url});
|
||||||
|
|
||||||
$acme->request_challenge_validation($data->{url});
|
$acme->request_challenge_validation($data->{url});
|
||||||
print "Sleeping for 10 seconds\n";
|
print "Sleeping for 5 seconds\n";
|
||||||
sleep 10;
|
sleep 5;
|
||||||
while (1) {
|
while (1) {
|
||||||
$auth = $acme->get_authorization($auth_url);
|
$auth = $acme->get_authorization($auth_url);
|
||||||
if ($auth->{status} eq 'pending') {
|
if ($auth->{status} eq 'pending') {
|
||||||
print "Status is still 'pending', trying again in 20 seconds\n";
|
print "Status is still 'pending', trying again in 10 seconds\n";
|
||||||
sleep 20;
|
sleep 10;
|
||||||
next;
|
next;
|
||||||
} elsif ($auth->{status} eq 'valid') {
|
} elsif ($auth->{status} eq 'valid') {
|
||||||
print "Status is 'valid', domain '$domain' OK!\n";
|
print "Status is 'valid', domain '$domain' OK!\n";
|
||||||
last;
|
last;
|
||||||
}
|
}
|
||||||
die "validating challenge '$auth_url' failed\n";
|
die "validating challenge '$auth_url' failed - status: $auth->{status}\n";
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
my $err = $@;
|
my $err = $@;
|
||||||
|
Loading…
Reference in New Issue
Block a user