fix: add cooldown when adding a record because let's encrypt is slow
This commit is contained in:
parent
e3a61d3eb6
commit
312f63d06b
1 changed files with 6 additions and 0 deletions
|
@ -58,8 +58,14 @@ def main() -> None:
|
||||||
except dns.resolver.NXDOMAIN:
|
except dns.resolver.NXDOMAIN:
|
||||||
values = []
|
values = []
|
||||||
log.info('response from DNS: %s', values)
|
log.info('response from DNS: %s', values)
|
||||||
|
|
||||||
if (args.method == 'begin') == (args.auth in values):
|
if (args.method == 'begin') == (args.auth in values):
|
||||||
|
if args.method == 'begin':
|
||||||
|
# success, but have to wait
|
||||||
|
# because let's encrypt dns is ??? slow
|
||||||
|
time.sleep(10)
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
||||||
time.sleep(5)
|
time.sleep(5)
|
||||||
log.warning('could not ensure the DNS record was created!!')
|
log.warning('could not ensure the DNS record was created!!')
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue