Skip to content

Instantly share code, notes, and snippets.

Christopher Griffith GriffithStudio

Block or report user

Report or block GriffithStudio

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@GriffithStudio
GriffithStudio / .readme.md
Created Aug 27, 2012
Promise Pegasus RAID Scripts
View .readme.md

Promise Pegasus RAID Scripts

Background

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.

launchd

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:

You can’t perform that action at this time.