Last active
July 23, 2026 18:56
-
-
Save angelorobo/e8d6afe260144292a5ea989c0674d98d to your computer and use it in GitHub Desktop.
Huntress installcheck script for Swif
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/zsh | |
| HUNTRESS_BIN="/Applications/Huntress.app/Contents/MacOS/Huntress" | |
| if [[ ! -x "$HUNTRESS_BIN" ]]; then | |
| echo "Huntress is not installed." | |
| exit 0 | |
| fi | |
| STATUS="$("$HUNTRESS_BIN" status 2>/dev/null)" | |
| echo "$STATUS" | |
| AGENT_OK=false | |
| EXTENSION_OK=false | |
| FDA_AGENT_OK=false | |
| FDA_EXTENSION_OK=false | |
| EDR_OK=false | |
| echo "$STATUS" | grep -q "Huntress Agent Version:" && | |
| AGENT_OK=true | |
| echo "$STATUS" | grep -Eq "Extension Status:[[:space:]]+installed" && | |
| EXTENSION_OK=true | |
| echo "$STATUS" | grep -Eq "Full Disk Access for Agent:[[:space:]]+true" && | |
| FDA_AGENT_OK=true | |
| echo "$STATUS" | grep -Eq "Full Disk Access for Extension:[[:space:]]+true" && | |
| FDA_EXTENSION_OK=true | |
| echo "$STATUS" | grep -Eq "EDR status:[[:space:]]+enabled" && | |
| EDR_OK=true | |
| if $AGENT_OK && | |
| $EXTENSION_OK && | |
| $FDA_AGENT_OK && | |
| $FDA_EXTENSION_OK && | |
| $EDR_OK; then | |
| echo "Huntress core agent and EDR are installed and healthy." | |
| if echo "$STATUS" | | |
| grep -Eq "Preauthorization Status:[[:space:]]+notGranted"; then | |
| echo "WARNING: Network content filter preauthorization is not granted." | |
| echo "This is an MDM profile issue and does not require application reinstallation." | |
| fi | |
| exit 1 | |
| fi | |
| echo "Huntress is missing or its core EDR components are unhealthy." | |
| exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment