Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Gandl livedns as a DynDNS Server
# retreive current external IP address from Akamai server
MY_IP=$(curl -s
# Gandi livedn API KEY
# Static Domain hosted at Gandi
# Dynamic Subdomain
#Get the current Zone for the provided domain
CURRENT_ZONE_HREF=$(curl -s -H "X-Api-Key: $APIKEY"$DOMAIN | jq -r '.zone_records_href')
# Update the A reccord of the Dynamic Subdomain by PUTing on the current zone
curl -D- -X PUT -H "Content-Type: application/json" \
-H "X-Api-Key: $APIKEY" \
-d "{\"rrset_name\": \"$SUBDOMAIN\",
\"rrset_type\": \"A\",
\"rrset_ttl\": 1200,
\"rrset_values\": [\"$MY_IP\"]}" \
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment