Pushing script via Intune to MacOS 12.4 and throwing error after downloading MAU.
Log contents:
##############################################################
# Wed Jul 13 16:04:17 EDT 2022 | Logging install of [Company Portal] to [/Library/Logs/Microsoft/IntuneScripts/installCompanyPortal/Company Portal.log]
############################################################
Wed Jul 13 16:04:17 EDT 2022 | Checking if we need Rosetta 2 or not
Wed Jul 13 16:04:17 EDT 2022 | Waiting for other [/usr/sbin/softwareupdate] processes to end
Wed Jul 13 16:04:17 EDT 2022 | No instances of [/usr/sbin/softwareupdate] found, safe to proceed
Wed Jul 13 16:04:17 EDT 2022 | Rosetta is already installed and running. Nothing to do.
Wed Jul 13 16:04:17 EDT 2022 | Checking if we need to install or update [Company Portal]
Wed Jul 13 16:04:17 EDT 2022 | [Company Portal] not installed, need to download and install
Wed Jul 13 16:04:17 EDT 2022 | Dock is here, lets carry on
Wed Jul 13 16:04:17 EDT 2022 | Starting downlading of [Company Portal]
Wed Jul 13 16:04:17 EDT 2022 | Waiting for other [curl -f] processes to end
Wed Jul 13 16:04:17 EDT 2022 | No instances of [curl -f] found, safe to proceed
Wed Jul 13 16:04:17 EDT 2022 | Downloading Company Portal [https://go.microsoft.com/fwlink/?linkid=853070]
Wed Jul 13 16:04:19 EDT 2022 | Found downloaded tempfile [CompanyPortal-Installer.pkg]
Wed Jul 13 16:04:19 EDT 2022 | Downloaded [Company Portal.app] to [CompanyPortal-Installer.pkg]
Wed Jul 13 16:04:19 EDT 2022 | Detected install type as [PKG]
Wed Jul 13 16:04:19 EDT 2022 | Starting downlading of [MAU]
updateMAU:25: = not found
##############################################################
Problem in line 74: if [ $? == 0 ]; then
It should be in double brackets or perhaps quoted. Made the change to double brackets and it tested successfully. I'll send a pull request with update.
Pushing script via Intune to MacOS 12.4 and throwing error after downloading MAU.
Log contents:
Problem in line 74: if [ $? == 0 ]; then It should be in double brackets or perhaps quoted. Made the change to double brackets and it tested successfully. I'll send a pull request with update.