Skip to content

Commit

Permalink
Add changes to mitigate issue #141 (#142)
Browse files Browse the repository at this point in the history
  • Loading branch information
JavaScriptDude authored Jul 14, 2024
1 parent 3e6b3db commit edbae2f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,21 @@ nano $ROOTDIR/dehydrated/config
HOOK_CHAIN="yes"
````

### Convigure Godaddy Auth API Keys as Environment Variables:
### Configure Godaddy Auth API Keys as Environment Variables:

````bash
# configure your API keys
export GD_KEY=your_key_here
export GD_SECRET=your_secret_here
````

#### Other Options
`GODADDY_DNS_SLEEP` - override [default TXT update wait time](https://github.com/josteink/le-godaddy-dns/issues/141) in seconds (default/min is 30s)
````bash
export GODADDY_DNS_SLEEP=60
````

### Running The Script

Now you need to configure `le-godaddy-dns` and retrieve your certs.

Expand Down
12 changes: 10 additions & 2 deletions godaddy.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,16 @@ def create_txt_record(args):
for i in range(0, len(args), 3):
domain, token = args[i], args[i+2]
_set_token_in_dns(domain, token)
logger.info(" + Sleeping to wait for DNS propagation")
time.sleep(30)

GODADDY_DNS_SLEEP = 30
try:
_tmp = int(os.environ["GODADDY_DNS_SLEEP"])
if _tmp > GODADDY_DNS_SLEEP: GODADDY_DNS_SLEEP = _tmp
except Exception as ex:
pass

logger.info(f" + Sleeping for {GODADDY_DNS_SLEEP}s to wait for DNS propagation")
time.sleep(GODADDY_DNS_SLEEP)


def delete_txt_record(args):
Expand Down

0 comments on commit edbae2f

Please sign in to comment.