Skip to content

Instantly share code, notes, and snippets.

@kdmurray kdmurray/ forked from mhussain/
Last active Dec 20, 2015

What would you like to do?
# Modified by kdmurray from the source at
# - Removed the comparison to the old WAN IP, forces an update each time the script is run
# - Added the touch command to an empty hidden file (~/.last-linode-ddns-refresh) to show
# when the last DDNS update took place.
echo "Fetching public IP address..."
WAN_IP=`curl -s`
echo "Updating DNS to $WAN_IP"
curl -s"$LINODE_API_KEY"\&api_action=domain.resource.update\&DomainID="$DOMAIN_ID"\&ResourceID="$RESOURCE_ID"\&Target="$WAN_IP" > /dev/null
touch ~/.last-linode-ddns-refresh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.