Added configurable wait period.
This commit is contained in:
parent
94aa40f848
commit
97c2f0581f
4 changed files with 17 additions and 7 deletions
|
@ -44,5 +44,5 @@ certbot certonly --manual --email you@example.com \
|
|||
</pre>
|
||||
|
||||
Please note that NameSilo DNS propagation takes up to **15 minutes**,
|
||||
so the scripts will wait 16 minutes before completing.
|
||||
so the scripts will wait 20 minutes before completing.
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#!/usr/bin/env python3.7
|
||||
#!/usr/bin/env python3.8
|
||||
|
||||
# authenticator.py
|
||||
#
|
||||
# Copyright (c) 2019, Erik C. Thauvin (erik@thauvin.net)
|
||||
# Copyright (c) 2019-20, Erik C. Thauvin (erik@thauvin.net)
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
|
@ -39,7 +39,15 @@ import urllib.request
|
|||
|
||||
import untangle
|
||||
|
||||
from config import apikey
|
||||
from config import apikey, wait
|
||||
|
||||
|
||||
def sleep(minutes):
|
||||
if minutes < 16:
|
||||
minutes = 16
|
||||
print("Waiting", minutes, "minutes for DNS changes to complete...")
|
||||
time.sleep(minutes * 60)
|
||||
|
||||
|
||||
domain = os.environ['CERTBOT_DOMAIN']
|
||||
validation = os.environ['CERTBOT_VALIDATION']
|
||||
|
@ -79,5 +87,5 @@ else:
|
|||
xml.namesilo.reply.code.cdata), file=sys.stderr)
|
||||
sys.exit(1)
|
||||
|
||||
# Sleep 16 minutes
|
||||
time.sleep(960)
|
||||
# Sleep X minutes
|
||||
sleep(wait)
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
# cleanup.py
|
||||
#
|
||||
# Copyright (c) 2019, Erik C. Thauvin (erik@thauvin.net)
|
||||
# Copyright (c) 2019-20, Erik C. Thauvin (erik@thauvin.net)
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
|
|
|
@ -1,2 +1,4 @@
|
|||
# Get your API Key from: https://www.namesilo.com/account_api.php
|
||||
apikey = "YOUR_API_KEY"
|
||||
# Minutes to wait for DNS changes to complete.
|
||||
wait = 20
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue