Just a oneliner to see the current active user is on a Mac
#!/bin/sh
ssh -F /config/ssh/config user@ipofMac ls -l /dev/console | awk ‘{print $3}’|sed s/root/‘Lock screen’/
- platform: command_line
name: Mac User
command: “/config/shell_script/Active_user_OSX.sh”
unit_of_measurement: “User”