MLBZ521 / MacAdmin

A collection of scripts and tools for managing Apple Devices
MIT License
166 stars 33 forks source link

connectionState is always blank due to State: being moved to CloudInfo #25

Closed sslawter closed 3 months ago

sslawter commented 1 year ago

I am not sure which version this change occurred, but State: has been moved to CloudInfo from Communications. This is causing the connectionState variable to be empty. The get_falconctl_stats function needs updated to include CloudInfo.

connectionState=$( echo "${falconctlStats}" | /usr/bin/awk -F "State:" '{print $2}' | /usr/bin/xargs )

get_falconctl_stats() {
    # Get the current stats.
    # Arguments
    # $1 = (str) path to falconctl

    "${1}" stats agent_info Communications CloudInfo 2>&1
    # Will eventually move to the --plist format, once it's fully supported
    # "${1}" stats agent_info Communications CloudInfo --plist
}
MLBZ521 commented 3 months ago

Hey @sslawter, sorry....I either missed this or forgot about it.... I've fixed this in 075323b.

MLBZ521 commented 3 months ago

Thanks for the heads up though!

I'm looking at few other things that can be fixed/improved as well.