Off the top of my head, a $100 fan center could shut the power connection when the feed from the power company goes down. Attach a 24V AC transformer to the power company line and wire it to the fan center's controller. Power goes down, circuit opens.
A $50 contactor could do the same. Look for a 2 pole (normally open) 120VAC coil. Power the coil from the power company line. When the power goes off, the contactor opens and you are disconnected.