Skip to content

Instantly share code, notes, and snippets.

@pcanterini
Created October 12, 2013 21:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pcanterini/6955085 to your computer and use it in GitHub Desktop.
Save pcanterini/6955085 to your computer and use it in GitHub Desktop.
update ip on dnsimple
#!/bin/bash
DOMAIN_ID=""
RECORD_ID=""
IP="`curl http://icanhazip.com/`"
curl -H 'X-DNSimple-Token: email:account_token' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-X PUT \
-d "{\"record\":{\"content\":\"$IP\"}}" \
https://dnsimple.com/domains/$DOMAIN_ID/records/$RECORD_ID
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment