Skip to content

Instantly share code, notes, and snippets.

View GriffithStudio's full-sized avatar

Christopher Griffith GriffithStudio

View GitHub Profile
GriffithStudio /
Created August 27, 2012 18:10
Promise Pegasus RAID Scripts

Promise Pegasus RAID Scripts


The Pegasus R6 is an incredible storage device, but it lacks the reasonable ability to send email alerts. Following Angel's blog post here here, I modified the scripts so they could run from launchd. Firstly, I had to use the PTY public class in order to communicate with the promiseutil command. This is because promiseutil is an interactive program that assumes that it is a run through TTY. Secondly, I added in system logging in case the email feature fails for some reason.


While these scripts work fine from the terminal's cli, running them through launchd can cause you problems because of the spawning subprocesses (mail and promiseutil). In order to get those to work properly, you must also use the AbandonProcessGroup directive. Below is the example: