ISPConfig Remote Framework Update DNS Records
I want to create a script that's runs on a remote server 'B' and checks to see if server 'A' is running. If server be is detected to be down past a threshold (say 5 min) then change the DNS records in server 'B' to point the website to itself. It would also need to handle the reverse when site 'A' comes online again.
Both servers would be running ISPconfig 3, preferably in a mirror setup. The changes would be made only to the remote server and changed back when the servers come back online. It needs to do this for each website on server 'A', which could be 1 or many.
Is this even plausible, or is there a better way to handle this?
Server 'A' hosts real site. DNS records for real site.
Server 'B' hosts 'down for maintenance' site. DNS for real site when online, DNS for self when offline.
I am just lost as to how to handle this.