Need your iOS devops in the cloud? We can help.
Be sure your Mac mini will restart automatically when needed | Macminicolo Blog - Tips, tutorials and reviews on running a Mac mini server

Be sure your Mac mini will restart automatically when needed

One of the services that we offer here is an option to remotely reboot your Mac mini. If your machine freezes and is unreachable for you, you can cycle the power on the outlet and have your machine reboot. This relies on the user-enabled feature in OS X to "Start up automatically after a power failure." The Remote Reboot process has worked great over the years and fixes most customer issues.
restart
Ever since Yosemite was released 18 months ago, this setting in the Energy Saver panel to will randomly be disabled. It will also be disabled after most OS X updates. It’s proven to be quite sporadic and we continue to look into the reasons behind it.

Luckily, in addition to the GUI, there is a simple command to enable the setting again:

sudo /usr/sbin/systemsetup -setrestartpowerfailure on

I asked for some help on Twitter for ways to keep this setting enabled:


Luckily, I have a lot of helpful followers on twitter so it was good to hear from a number of them. (Special thanks to @consultantrr, @rjames86 and @gmarnin) After chatting with a few people and looking at different options, we decided a nice script would be the way to go.

TJ Luoma has put together a nice script on github to help with the issue. You can read about it and download the script here. Once the script is ran on your machine, it will run the enabling terminal command once per hour. This is useful for anyone running a headless Mac, not just those in our data center.

This is still a work in progress. If you have more that you can add to the conversation, please send us a message on Twitter.