You could use an IP SLA with track commands for this. Good example found here:
http://www.firewall.cx/cisco-technical-knowledgebase/cisco-routers/813-cisco-router-ipsla-basic.html
IOS or license may need to be upgraded as IP SLA is not in base software.