We have noticed the script s having issues on newer Macs and trying to run the process on multiple users. The way the currentUser is found should be changed to what Scripting OS X has outlined here https://scriptingosx.com/2019/09/get-current-user-in-shell-scripts-on-macos/ Make the following change in the script ``` #currentUser=$(who | awk '/console/{print $1}') currentUser=$( scutil <<< "show State:/Users/ConsoleUser" | awk '/Name :/ && ! /loginwindow/ { print $3 }' ) ```
We have noticed the script s having issues on newer Macs and trying to run the process on multiple users. The way the currentUser is found should be changed to what Scripting OS X has outlined here https://scriptingosx.com/2019/09/get-current-user-in-shell-scripts-on-macos/
Make the following change in the script