Detect whether BitDefender is installed

AlexSchajer
New Contributor

I have a policy that installs BitDefender as per their documentation.

We think that this is working correctly but have had a some cases of 'false positives' 

So I was thinking about creating a Smart Group by using an Extension Attribute that runs the following command line script:

/Library/Bitdefender/AVP/enterprise.bundle/productConfigurationTool -authToken ***** -asksForStatus

My script looks like this:

#!/bin/bash

if [ -f "/Library/Bitdefender/AVP/enterprise.bundle/productConfigurationTool" ] ; then 
    BDV=$(/Library/Bitdefender/AVP/enterprise.bundle/productConfigurationTool -authToken ****** -asksForStatus 2>&1 | jq -r .error)
else
    BDV="FNF"
fi

echo "<result>${BDV}</result>"

I am getting blanks in my Extension Attribute  - not even 'FNF' . So not sure it's running, erroring, not having the right permissions etc? (Hence the file checking and error handling)

Is there anyway to debug or see that it's been run etc?

Thanks

2 REPLIES 2

sdagley
Esteemed Contributor II

@AlexSchajer Are you installing jq on all of your Macs? It's not part of the standard macOS install, and if it's not installed your EA is going to fail with no return.

AlexSchajer
New Contributor

Thanks - that's a good shout. Assumed if it was on my test machine it would be on all of them :)