I'm trying to put together an Extension Attribute that will alert me to whether zscaler is logged in or not.
This is what I've come up with. It works when run locally, and I thought it was working when run through Jamf but I'm noticing that machines are now reporting back as "No" when I have checked and zscaler is correctly logged in. Just wondering if anyone else has an EA that they use or could tell me what's happening.
Thanks
#!/bin/bash
currentUser=`ls -l /dev/console | awk '{print $3}'`
if (security find-generic-password -l 'com.zscaler.tray'); then
echo "<result>Yes</result>"
else
echo "<result>No</result>"
fi
exit 0