diff --git a/scripts/script-post.sh b/scripts/script-post.sh index a624e96..045c919 100644 --- a/scripts/script-post.sh +++ b/scripts/script-post.sh @@ -1,6 +1,8 @@ #!/bin/bash api_key='' -domainID='' +#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') while records=$(curl -s -X GET "https://api.dynu.com/v2/dns/$domainID/record" -H "accept: application/json" -H "API-Key: $api_key")