acme.sh: Support for public DNS checks (remove --dnssleep option on 0s) (#3079)

This commit is contained in:
Awalon
2022-10-11 13:55:30 +02:00
committed by GitHub
parent ae23fad25c
commit 6e94bd8709
3 changed files with 9 additions and 5 deletions
@@ -126,9 +126,11 @@
</field>
<field>
<id>validation.dns_sleep</id>
<label>Sleep Time</label>
<label>DNS Sleep Time</label>
<type>text</type>
<help>The time in seconds to wait for all the TXT records to take effect after adding them to the DNS API. Defaults to 120 seconds.</help>
<help>The time in seconds to wait for all the TXT records to take effect after adding them to the DNS API. Defaults to 120 seconds.
For public DNS validation each 10 seconds up to 20 minutes, instead of fixed DNS sleep time set value to 0.</help>
<hint>0 for public DNS check or 1-84600s</hint>
</field>
<field>
<label>Active24</label>
@@ -80,7 +80,9 @@ abstract class Base extends \OPNsense\AcmeClient\LeCommon
switch ((string)$this->config->method) {
case 'dns01':
$this->acme_args[] = LeUtils::execSafe('--dns %s', (string)$this->config->dns_service);
$this->acme_args[] = LeUtils::execSafe('--dnssleep %s', (string)$this->config->dns_sleep);
if (! (string)$this->config->dns_sleep == '0') {
$this->acme_args[] = LeUtils::execSafe('--dnssleep %s', (string)$this->config->dns_sleep);
}
break;
case 'http01':
$this->acme_args[] = '--webroot ' . self::ACME_WEBROOT;
@@ -505,10 +505,10 @@
</OptionValues>
</dns_service>
<dns_sleep type="IntegerField">
<MinimumValue>1</MinimumValue>
<MinimumValue>0</MinimumValue>
<MaximumValue>84600</MaximumValue>
<default>120</default>
<ValidationMessage>Please specify a value between 1 and 84600.</ValidationMessage>
<ValidationMessage>Please specify a value between 0 and 84600 seconds.</ValidationMessage>
<Required>Y</Required>
</dns_sleep>
<dns_active24_token type="TextField">