Created
April 5, 2013 15:56
-
-
Save cwise/5320439 to your computer and use it in GitHub Desktop.
Update DNSimple with DynamicD
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
LOGIN="<your DNSimple login here>" | |
TOKEN="<your API token here>" | |
DOMAIN_ID="<your domain id here - use /domains to find it>" | |
RECORD_ID="<your record id here - use /domains/:domain_id/records to find it>" | |
IP="`curl http://icanhazip.com/`" | |
curl -H "Accept: application/json" \ | |
-H "X-DNSimple-Token: $LOGIN:$TOKEN" \ | |
-H "Content-Type: application/json" \ | |
-X PUT \ | |
https://DNSimple.com/domains/$DOMAIN_ID/records/$RECORD_ID.json \ | |
-d {\"record\":{\"content\":\"$IP\"}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment