This page contains a set of scripts that do the job. I used these scripts for years on the Linksys NSLU2 NAS.
They are well written and, despite written for running on the NSLU2, they are not platform dependent. I have successfully used them on a regular linux box.
Hope it helps as a kickstart for you to write one for the purpose you described (managing multiple dyndns domais). Good luck!