diff --git a/Mac/Flight Checks/tailscale.sh b/Mac/Flight Checks/tailscale.sh index 6b41b52..4d8da51 100755 --- a/Mac/Flight Checks/tailscale.sh +++ b/Mac/Flight Checks/tailscale.sh @@ -96,7 +96,7 @@ check_auth_profile() { #echo "Auth Profile Present" # Check the configuration profile for the auth key local profile_check - profile_check=$(profiles -P | grep -A5 "com.purplecomputing.mdm.tailscale.authkey" | grep "io.tailscale.ipn") + profile_check=$(profiles show -type configuration -output stdout-xml | xmllint --format - | grep -A100 "com.purplecomputing.mdm.tailscale.authkey" | grep -A2 "PayloadType" | awk 'NR==2' | sed -E 's#(.*)#\1#' | sed 's/^[ \t]*//') if [[ -z "$profile_check" ]]; then echo "Error: No Tailscale identifier found in the configuration profile." @@ -130,7 +130,7 @@ check_config_profile() { #echo "Config Profile Present" # Check the configuration profile for the auth key local profile_check - profile_check=$(profiles -P | grep -A5 "com.purplecomputing.mdm.tailscale" | grep "io.tailscale.ipn") + profile_check=$(profiles show -type configuration -output stdout-xml | xmllint --format - | grep -A100 "com.purplecomputing.mdm.tailscale" | grep -A2 "VPNSubType" | awk 'NR==2' | sed -E 's#(.*)#\1#' | sed 's/^[ \t]*//') if [[ -z "$profile_check" ]]; then echo "Error: No Tailscale identifier found in the configuration profile."