get domainID from CERTBOT_DOMAIN variable
change proposed by ckhmer1 (https://github.com/aney1/certbot-domainvalidation-dynu/issues/1)
This commit is contained in:
parent
35b5b16255
commit
5d18c6fca7
1 changed files with 3 additions and 1 deletions
|
@ -1,6 +1,8 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
api_key='<PUT_YOUR_API_KEY_HERE>'
|
api_key='<PUT_YOUR_API_KEY_HERE>'
|
||||||
domainID='<PUT_YOUR_DOMAIN_ID_HERE>'
|
#Get domainID:
|
||||||
|
dns=$(curl -X GET https://api.dynu.com/v2/dns -H "accept: application/json" -H "API-Key: $api_key")
|
||||||
|
domainID=$(echo $dns | jq ".domains[] | select(.name==\"$CERTBOT_DOMAIN\")" | jq '.id')
|
||||||
|
|
||||||
|
|
||||||
#Create record
|
#Create record
|
||||||
|
|
Loading…
Reference in a new issue