There's probably a way to consolidate the two cut commands at the end of
this, but it has worked for me:/usr/sbin/ioreg -i -w 0 -f -r -c
AppleSmartBattery | /usr/bin/grep "BatteryData" | /usr/bin/grep -o
'DesignCapacity.*' | /usr/bin/cut -f2- -d"=" |...
Here's a couple alternatives to the ioreg command to get the serial
number if you wanted to try them in its place:system_profiler
SPHardwareDataType | grep "Serial Number (system)" | awk '{ print $4
}'orsystem_profiler SPHardwareDataType | awk '/Seri...
You could test a policy with the "Network State Change" trigger
containing a script to check if the expected utun interface is in use if
the WiFi is actively connected. The things I would consider checking
here are the utun results from ifconfig, and...