Assistance with EA to determine Forcepoint Status

cgreid
New Contributor III

I'm trying to create an EA that determines if Forcepoint is running or not. I wrote the script out as a bash script first to test to make sure it returned what was needed and it works just fine. However, once I copied it over to JAMF, I always get FALSE.

I changed it to just echo the results of the command and it didn't return anything. I can't figure out why it's always returning FALSE. Am I missing something?

#!/bin/sh

dlp_status=$(wepsvc --status --wsdlp)

if [ "$dlp_status" == "The kernel extension is loaded and the daemon is running. The component is running." ]; then
       echo "<result>TRUE</result>"
else echo "<result>FALSE</result>"
fi

exit 0
1 REPLY 1

bmee
Contributor

When JAMF is running, it doesn't know the location of the forcepoint agent. You'll need to add the location to it. We've made some change to your script and confirmed that it's working on version 21.07.0324. hope this help

#!/bin/sh

dlp_status=$(/usr/local/sbin/wepsvc --status --wsdlp)

if [ "$dlp_status" == "The component is running." ]; 
then echo "<result>Running</result>"
else echo "<result>Not Running</result>"
fi

exit 0