0

Is it possible in Ubuntu to shutdown my PC after a certain time has passed by when WiFi disconnects and could not reconnect back?

I have a mining rig that sometimes disconnects when I am away from home. It also could not reconnect to WiFi after getting disconnected. So I'm thinking it will be better for the rig to automatically power off when internet connection drops after a period of time rather that to leave it on while using electricity. Thanks a bunch.

  • there is the hibernate and suspend settings in power management, but I am not wure if internet activity is enough to prevent idle status. – ravery Sep 19 '17 at 12:31
  • By script you can do that, If internet disconnect(check using ping), then pc goes to suspend mode and back to normal mode when script get the ping response. – Nullpointer Sep 19 '17 at 12:34

1 Answers1

0

You could adapt my answer to this question ("How to rotate WiFi connections"), changing The Next Thing (my answer uses it to bring up a different WiFi connection) to do what you want.

waltinator
  • 36,399