Uses online site to check current ip address which is saved to a file, when re-run the saved ip is compared with a check of the current again and if it is different will log into the rackspace API to remove the old entry and create a new one.
Best to have the DNS entry with a very short TTL, rackspace has 300 seconds as the shortest.
The mail file can be replaced with anything, or just blank for no action. By default it will mail if there has been a change or a problem processing the new ip address.
Add a cron: