Hi guys,
I am trying to run a script as a Self Service policy that will collect Vectorworks log files from a Users machine and add it as an attachment in the device's inventory.
I found this script by Matt Taylor that is really good:
https://github.com/matt-taylor934/loguploader/blob/master/loguploader.sh
But I can't figure out how to get it to include the Vectorworks log file at this location: /Users/logged.in.user/Library/Application Support/Vectorworks/2019/VW User Log.txt
I added a variable for the location of the log file to the compressed zip $vwFileLocation but its not int he output:
I guess it needs the logged in user? I don't know how to get the logged in user. Or does it need to run as the logged in user and how do I do that?
Scripting is very new to me so any help would be appreciated.