Created
October 12, 2013 21:22
-
-
Save pcanterini/6955085 to your computer and use it in GitHub Desktop.
update ip on dnsimple
This file contains 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 | |
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