Hi There,
I have a re-wrapped version of Terminal Notifier that i wish to use to notify end user of policies etc..
I have a collection of scripts that work locally as the user as when as root from the terminal (via su).
But they seem to either hang or fail with a syntax error when run by Casper. Any pointers? Examples below:
#!/bin/sh
loggedInUser=`/bin/ls -l /dev/console | /usr/bin/awk '{ print $3 }'`
if [[ $loggedInUser != root ]]; then
echo "User $loggedInUser is logged in..."
# Display alert to the user
su "$loggedInUser" -c `/usr/local/bin/Company Alerts.app/Contents/MacOS/terminal-notifier -title "Updates Are Awaiting Install" -message "These updates will be installed when you next logout, restart or shutdown" -groupid updates`
else
echo "No User logged in..."
fi