Skip to content

Instantly share code, notes, and snippets.

Created April 7, 2014 21:42
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save digitaljhelms/10063643 to your computer and use it in GitHub Desktop.
DNSimple hostname updater on OS X (prior to Yosemite)
. /etc/rc.common
AUTH_EMAIL='' # dnsimple account email address
AUTH_TOKEN='' # dnsimple api token
DOMAIN_ID='' # domain name or id
RECORD_ID='' # record id to update
foo ()
curl -H "X-DNSimple-Token: $AUTH_EMAIL:$AUTH_TOKEN" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-X PUT \
-d "{\"record\":{\"content\":\"$IP\"}}" \$DOMAIN_ID/records/$RECORD_ID
StartService ()
# StopService ()
# {
# }
RestartService ()
RunService "$1"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "">
<plist version="1.0">
<string>DNSimple Dynamic Local IP Updater</string>
Copy link

  1. Fork this gist
  2. Edit variables
  3. cd /Library/StartupItems
  4. Clone fork to a directory named "DNSimpleUpdater"
  5. sudo /sbin/SystemStarter start "DNSimpleUpdater"
  6. Verify results on DNSimple website

Copy link

OS X Yosemite removed the SystemStarter executable; this approach has been deprecated and should be used on systems running OS X Yosemite and higher.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment