I am new to Raspberry Pi, but I was looking to use one as a PiHole from the small Zero wireless series.
My thought was to run it connected to the router itself using the USB port from that to give it the power. When I switch my router off though, I don't want the power to cut from the Pi.
I looked into batteries, but then couldn't figure out how to have it shutdown if the battery was just continuing the running.
I wanted to see if this method: http://weworkweplay.com/play/rebooting-the-raspberry-pi-when-it-loses-wireless-connection-wifi/ was a good pathway but rather than reboot, shutdown?
With a battery connected, would this work?