I have a policy with a bunch of maintenance & system tweak scripts that sometimes takes forever to run. In trying to troubleshoot it, I thought I'd add a couple of lines to the end of each script for additional logging. Does anyone know if / how I can create a parameter that will return the name of the script?
That would allow me to do something like:
MYDATE=$(date '+%a %b %d %H:%M:%S');
echo $MYDATE $2 "Finished running " $[magic-parameter-for-script-name] >> /var/log/jamf.log;
is this doable?
