DNSimple DNS Updater for OS X Yosemite
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>KeepAlive</key> | |
<false/> | |
<key>Label</key> | |
<string>com.dnsimple.dynamicdns</string> | |
<key>LowPriorityIO</key> | |
<true/> | |
<key>ProgramArguments</key> | |
<array> | |
<string>/usr/local/bin/DNSimpleUpdater</string> | |
</array> | |
<key>RunAtLoad</key> | |
<true/> | |
</dict> | |
</plist> |
#!/bin/bash | |
AUTH_EMAIL='your@email' # dnsimple account email address | |
AUTH_TOKEN='your-api-token' # dnsimple api token | |
DOMAIN_ID='yourdomain.com' # domain name or id | |
RECORD_ID='12345' # record id to update | |
IP="`curl http://icanhazip.com/`" | |
curl -H "X-DNSimple-Token: $AUTH_EMAIL:$AUTH_TOKEN" \ | |
-H "Accept: application/json" \ | |
-H "Content-Type: application/json" \ | |
-X PUT \ | |
-d "{\"record\":{\"content\":\"$IP\"}}" \ | |
https://api.dnsimple.com/v1/domains/$DOMAIN_ID/records/$RECORD_ID | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment