How to handle a circuit switched by ground

I've drawn a crude diagram of my setup. Does this help?

Sorry but no, there could be anything going on in those boxes.