I'm trying to make a template in the JSS for notifications using Terminal Notifier. I made this script quick to do some sanity checks, but it still doesn't work like I expect. Notifications don't come through for some reason.```
!/bin/bash
HARDCODED VALUES ARE SET HERE
title="$7"
message="$8"
loginwindowuser=ps auxc | grep loginwindow | grep root|awk '{print $1}'
osvers=$(sw_vers -productVersion | awk -F. '{print $2}')
gem=gem list terminal-notifier -i
########################################################################################
# SCRIPT CONTENTS - DO NOT MODIFY BELOW THIS LINE
########################################################################################
if [[ ${osvers} -lt 8 ]]; then
echo "10.8 not installed"
exit 0;
else
if [[ ${gem} != true ]]; then
echo "Terminal Notifier not installed"
exit 0;
else
if [ "$loginwindowuser" == "root" ]; then
echo "At Login Window"
exit 0;
else
terminal-notifier -message "$8" -title "$7"
fi
fi
fi
exit 0
```