There are a couple of options:
1. Keep two scripts on the system, one to change the IP/DNS from production to DR during failover, and one to change the IP/DNS from DR to production. Simply rename the script you what to have run to whatever is in the recovery plan. It works, but does not scale well.
2. Write a script with logic to read the IP address of the system and change the IP/DNS to whatever it should be in that environment via an if/then statement. For example, if you are doing from production to DR, the script will see a production IP and change it to the DR IP and update DNS for the new address.
I did option 1, as I found it to be easier.