Posted on 03-04-2019 02:29 AM
After consulting with Eset, I've written the below Extension Attribute to spit out the version of Eset Security installed. When I try that script in terminal I get the result: 6.7.654. When I create a smart group in Jamf with operator is and value 6.7.654 I don't see any results in the group.
In Extension Attribute I've chosen: Data Type: String and Input Type: Script
In short, the script does work but Jamf doesn't like it as Extension Attribute. Any idea?
The script is:
esets_scan="/Applications/ESET Endpoint Security.app/Contents/MacOS/esets_scan"
if [[ -e "$esets_scan" ]]; then
esetversion=$("$esets_scan" -v | awk '{ print $5 }')
echo $esetversion
exit 0
else
echo "Not Installed"
fi
exit 0
Solved! Go to Solution.
Posted on 03-04-2019 02:21 PM
As @putnajoe mentioned, the format for your EA is not correct, so you won't get any results until that is fixed. Try something like this
#!/bin/bash
esets_scan="/Applications/ESET Endpoint Security.app/Contents/MacOS/esets_scan"
if [[ -e "$esets_scan" ]]; then
result=$("$esets_scan" -v | awk '{ print $5 }')
else
result="Not Installed"
fi
echo "<result>$result</result>"
The other thing to keep in mind about EAs is that they only get populated on inventory collection. Even after you correct the script, you will need to either wait until your Macs start submitting new inventory to see any results, or force them to submit new inventory soon after getting the EA in place.
Posted on 03-04-2019 06:24 AM
Extension attributes need to have the results defined in brackets <results></results> to populate to the JSS. For my own EAs, I usually have a line that echos the variable in the brackets.
echo "<result>$Variable</result>"
I hope this helps.
Posted on 03-04-2019 02:21 PM
As @putnajoe mentioned, the format for your EA is not correct, so you won't get any results until that is fixed. Try something like this
#!/bin/bash
esets_scan="/Applications/ESET Endpoint Security.app/Contents/MacOS/esets_scan"
if [[ -e "$esets_scan" ]]; then
result=$("$esets_scan" -v | awk '{ print $5 }')
else
result="Not Installed"
fi
echo "<result>$result</result>"
The other thing to keep in mind about EAs is that they only get populated on inventory collection. Even after you correct the script, you will need to either wait until your Macs start submitting new inventory to see any results, or force them to submit new inventory soon after getting the EA in place.
Posted on 03-04-2019 03:31 PM
Thanks both!
Posted on 02-17-2023 06:30 AM
We introduced ESET to replace mcafee...
Oh dear....
We binned it after so many issues... All I can say is .. best of luck :-)(