I have better than UPS. I have watchdog on my server. It is a reprogrammed wifi-plug, which turns power off&on if it cannot see the server, or does not get ping every 5 minutes.
And the server can also restart wifi-router and cable modem if cannot ping the selfsame watchdog (and 8.8.8.8) at reasonable intervals.
And the server can also restart wifi-router and cable modem if cannot ping the selfsame watchdog (and 8.8.8.8) at reasonable intervals.