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 (
promiseutil). In order to get those to work properly, you must also use the
AbandonProcessGroup directive. Below is the example: