Posted on 10-19-2022 06:00 AM
Hi everyone
Some machines have Aternity_MacAgent_3.5.0-102, some do not have any agent, i have multiple OS installed.
My script was not successful, any idea?
Posted on 10-19-2022 07:19 AM
I think you are missing line 4 in Step 5 from your script. This is where the $this_user variable is defined. If the $this_user variable is not defined the script wont know where to put the files and will error out.
#!/bin/bash
#Get the current user on a device. Notice the back-quote for embedding the python script.
this_user=$(scutil <<< "show State:/Users/ConsoleUser" | awk '/Name :/ && ! /loginwindow/ { print $3 }')
# Copy the Agent pkg file to the home or shared directory of the user.
# Use the copy method for your distribution system.
#Set up the pkg file with full logs, placing the Agent files in the home directory of the user.
su -l $this_user -c "/usr/sbin/installer -verboseR -dumplog -pkg /Users/$this_user/mac-agent.pkg -target CurrentUserHomeDirectory"
Posted on 10-19-2022 03:06 PM
Also, in Monterey (not sure of the version) Apple has removed Python, so if your installer is using Python it will fail on these devices. I think the latest installer from Aternity no longer uses Python.
Posted on 10-19-2022 03:29 PM
Apple removed Python 2.7, not Python as a whole. They did this with 12.3 back in March. You must now use Python 3, so any scripts using Python 2.7 need to be updated to function.
Posted on 10-24-2022 11:15 PM
Correct.
Script adjusted and deployment testing
Posted on 11-23-2022 04:48 AM
Hi @AJPinto
Indeed, i have this error:
Could you please help me fixed, I sam not good at scripting :(
Thanks