Posted on 02-21-2020 02:44 PM
Is there a way to store script output back to Jamf? Is it possible to do it in a way that is searchable?
I would like to be able to create a Computer Search for "firewall disabled".
To get the data, I could call socketfilterfw --getglobalstate in a script and report the output back to Jamf.
Is this possible?
Thank you!
Solved! Go to Solution.
Posted on 02-23-2020 10:01 AM
Hi @NullPointer - yup, you're looking for a Computer Extension Attribute Populated by a Script.
What you describe would look something like
#!/bin/sh
echo "<result>$(/usr/libexec/ApplicationFirewall/socketfilterfw --getglobalstate)</result>"
But you'd likely want to parse that output a bit:
#!/bin/sh
echo "<result>$(/usr/libexec/ApplicationFirewall/socketfilterfw --getglobalstate| awk '{print $3}' | sed 's/.$//')</result>"
Posted on 02-23-2020 10:01 AM
Hi @NullPointer - yup, you're looking for a Computer Extension Attribute Populated by a Script.
What you describe would look something like
#!/bin/sh
echo "<result>$(/usr/libexec/ApplicationFirewall/socketfilterfw --getglobalstate)</result>"
But you'd likely want to parse that output a bit:
#!/bin/sh
echo "<result>$(/usr/libexec/ApplicationFirewall/socketfilterfw --getglobalstate| awk '{print $3}' | sed 's/.$//')</result>"
Posted on 02-24-2020 06:39 AM
Thank you @kenglish ! I didn't realize Computer Extension Attributes existed, this opens so many doors!