update dns script terminate old instances