I currently run a pi-hole setup with 2 raspis that provide dns from different upstream servers.
Raspi1 -> 192.168.1.10
Raspi2 -> 192.168.1.11
Raspi1 is also the DHCP-Server for the subnet.
Raspi2 is using conditional forwarding to get the Names of local clients from Raspi1.
Recently Raspi1 wouldn't respond to DNS Queries or DHCP Request and I had to enable the DHCP on Raspi2.
Now I would like to have some sort of Script or similar, which switches the DHCP-Server from Raspi1 to Raspi2 and also back to Raspi1 in a Weekly cycle. Can this be done via a shell script which gets executed via cronjob and which Settings do I need to change in the config files?