My primary server in my home is my Mac Mini (it's currently only running leopard, waiting on snow leopard to arrive to decide on upgrading to the full server version). My office is setup on an APC UPS, the server being the main system on the UPS and the system connected to the data port. What I want to do is; in the event of a power failure and the UPS kicks in, I'd like for the server to display a growl message (All growl messages are forwarded to my client machines), and prompt all of the client machines on the UPS to shut down (This would exclude my macbook, since it is not running on the UPS. No point in it). Just as how going to the menu in the top left and clicking shut down, I want that dialog to pop up. I'm guessing there's a terminal command I can issue to present that dialog (I'd just setup ssh+rsa keys on a shell script to execute that).
My initial thoughts were just to use the upsd & upsc unix programs, however, they are not present in the macports repositories (bastards!). Does anyone have any suggestions or possible solutions for this? I just need a way to execute a script once the ups kicks in (or at a specified point).
My initial thoughts were just to use the upsd & upsc unix programs, however, they are not present in the macports repositories (bastards!). Does anyone have any suggestions or possible solutions for this? I just need a way to execute a script once the ups kicks in (or at a specified point).