|How To Keep Helix Server OS X Running|
With the release of Helix Server OS X, the question has arisen: is there a way to monitor the Server and automatically relaunch it if it gets shut down somehow (i.e. a crash or user error)? This technote addresses that question.
The PowerKey and Kick-off! products from Sophisticated Circuits are the best solution. They provide powerful system monitoring and recovery options including email notifications and more.
A small AppleScript applet that runs all the time looking for Helix Server, and if not found, restarts the Mac will also work. In fact, here is a simple one that can be retrieved from our FTP server. Log into our FTP server (ftp.qsatoolworks.com) and download it, or pick it up via HTTP here:
Note: this script actually does a restart of the server hardware. This carries the implication that your Helix Server logs in automatically and that both this script and your collection are set as startup items for that user.
Restarting the server may be overkill in most situations (this was written to help somebody work around a crash before it was fixed in the 6.0.1 update) so it includes a "Relaunch Helix" bit of code too. Before you can use that code, you must open the script and edit the section that contains the path to your files. Look for this piece of code:
You have to replace the "Path:to:your:..." bits with real paths pointing to your collection and application. Real paths will look something like this "Hard Disk:Users:Matt:Helix Server OS X"
Once that is done, the "Relaunch Helix" button should work. If you want that to become the default, you'll have to edit the code further. That is left as an exercise for the reader.
Helix 6.0 and later include a preference option that lets you suppress the ‘Crash Warning’ notification dialogs that appear when relaunching after a crash, making restarting the Server automatic regardless of how it quit. In Helix Server 6.0, editing these requires a trip into your favorite Property List editor. The FAQ page Helix 6 Server — Changing Esoteric Preferences details how to make this change. (The complete list of preferences is found in on this page.)