Skip to content

Instantly share code, notes, and snippets.

@beigna
Created July 23, 2013 03:14
Show Gist options
  • Save beigna/6059596 to your computer and use it in GitHub Desktop.
Save beigna/6059596 to your computer and use it in GitHub Desktop.
afraid.org NS Update
#!/bin/sh
REGISTERED_IP=$(dig @ns1.afraid.org your.domain.here +short)
CURRENT_IP=$(wget -q -O - http://checkip.dyndns.org|sed s/[^0-9.]//g)
[ "$REGISTERED_IP" != "$CURRENT_IP" ] && {
URL="http://freedns.afraid.org/dynamic/update.php?your-afraid-token-here=&address=$CU
wget -q -O - $URL
#echo "Updated from $REGISTERED_IP to $CURRENT_IP"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment