Code Monkey home page Code Monkey logo

installomator's Introduction

Installomator

The one installer script to rule them all.

   

Important: The default (main) branch is a beta version of the next release. It contains the latest fixes, new labels and changes to application labels, but they are also not thoroughly tested yet. Installomator is designed so that changes to application labels should not affect the behavior of the script outside of that label, so it should be mostly safe, but things may be in flux. If you want the latest release version, you can either switch to the release branch from the branch menu above the file list (where is says 'main' by default) or download the Installomator latest, non-beta, zip from the 'Releases' area and extract Installomator.sh. More detail on the wiki.

Always test carefully and thoroughly in your environment before going to production!

Every production and deployment environment is different: please test thoroughly before rolling it out to your production.

We have put a lot of work into making it stable and safe, but we cannot and will not make any promises that it won't break in some not yet encountered edge case.

Support and Contributing

Please note, that if you are contributing to this project with new labels or other suggestions in PRs, please put your changes in the files in the fragments-folder. DO NOT edit the full Installomator.sh script. The full script is assembled from the fragment files for release, and will be overwritten. See the README.md file in the utils directory for detailed instructions.

Discussion, support and advice around Installomator happens in the #installomator channel in the MacAdmins.org Slack. Please go there for support questions. Do not create an issue just when you have a questions, but do file an issue or pull request (PR) for bugs or wrong behavior. When in doubt, ask in the above Slack channel.

Please see CONTRIBUTING.md for how to contribute.

Installomator Wiki

Authors and Contributors

Installomator was originally inspired by the download scripts from William Smith - @talkingmoose and Sander Schram - @macbofh, and created by:

with help from Erik Stam - @erikstam

The Installomator team:

And with numerous contributions from many others. Thank you all, very much!

installomator's People

Contributors

acodega avatar adibue avatar aduffner avatar apizz avatar asri-tm avatar bartreardon avatar bigmacadmin avatar buckbanzai avatar dnikles avatar duderin0 avatar fleish avatar fletchers7 avatar gabemarchan avatar gilburns avatar greatkemo avatar jcmbowman avatar jnichols35 avatar jordythery avatar kdrwygvh avatar kryptonit1 avatar macmangr avatar madtice avatar marcelpogorzelski avatar meschwartz avatar northalpha avatar scriptingosx avatar theile avatar wakco avatar wantedwriter avatar worthypants avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

installomator's Issues

Examples of bypassing Login Auth URLS

Are there any examples (hopefully none that I missed) that show how to bypass auth via the Curl command?

I was redirected here as an option to download/automate Jamf Connect but I cant find anything on the forums on this GH that shows how its possible since theres a login token (or something of that nature) that is appended to the download URL

Microsoft Excel version

So, this is really more of an issue for whomever updates the info at macadamins.software... but the version of Excel listed there in the XML is 16.47, but it's actually 16.47.1.

If you look at the "Office for Mac Release History" section it lists 16.47.1, and offers an Excel update there.

I don't know the best way to resolve this. Maybe a regex expression that looks to see if the installed version is newer than the 'current' version being pulled from the 'authoritative' source? That could be helpful for other software titles to possibly.

xpath command in Big Sur requires '-e' argument

The xpath command changes in Big Sur and will require a different syntax depending on the macOS version it is running on. This will affect all the labels that use xpath to parse an xml for the downloadURL.

When Adobe reader release newest version, the last installer link will not have lastest version

example in adobereaderdc-install function

downloadURL=$(curl --silent --fail -H "Sec-Fetch-Site: same-origin" -H "Accept-Encoding: gzip, deflate, br" -H "Accept-Language: en-US;q=0.9,en;q=0.8" -H "DNT: 1" -H "Sec-Fetch-Mode: cors" -H "X-Requested-With: XMLHttpRequest" -H "Referer: https://get.adobe.com/reader/enterprise/" -H "Accept: */*" "https://get.adobe.com/reader/webservices/json/standalone/?platform_type=Macintosh&platform_dist=OSX&platform_arch=x86-32&language=English&eventname=readerotherversions" | grep -Eo '"download_url":.*?[^\\]",' | head -n 1 | cut -d \" -f 4)

will return AcroRdrDC_2100120145_MUI.dmg
But latest version record in

appNewVersion=$(curl -s https://armmf.adobe.com/arm-manifests/mac/AcrobatDC/reader/current_version.txt)

is 21.001.20149
That cause issue when script think they installed latest version but it just reinstall the old one.

Brave download is broken

Current URL is listed as https://laptop-updates.brave.com/latest/osx, but this is a redirect to https://brave-browser-downloads.s3.brave.com/latest/Brave-Browser.dmg.

Not sure if it's best to change to the latter URL. I tried substituting the current URL for $(curl -fs https://laptop-updates.brave.com/latest/osx) but did not complete successfully.

Fix 8x8 URL command

8x8 causing issues.

Running the current download URL command returns 2 URLs:

curl -fs -L https://support.8x8.com/cloud-phone-service/voice/work-desktop/download-8x8-work-for-desktop | grep -m 1 -o "https.*dmg"
https://vod-updates.8x8.com/ga/work-dmg-v7.2.4-2.dmg" href="https://vod-updates.8x8.com/ga/work-dmg-v7.2.4-2.dmg

There may be a better way to do this, but added a sed and awk to remove the first collected URLs trailing " and collect just the first collected URL

curl -fs -L https://support.8x8.com/cloud-phone-service/voice/work-desktop/download-8x8-work-for-desktop | grep -m 1 -o "https.*dmg" | sed 's/\"//' | awk '{print $1}'

Whitespace and newline barriers to contributing

First, thank you @scriptingosx et al for creating Installomator. I'm really looking forward to moving away from AutoPkg.

With that said, I'm not exaggerating when I say that I spent literal hours trying to figure out how to use .gitattributes, as well as VSCode settings.json exclusions and extension troubleshooting to ignore whitespace and the missing newline at the end-of-file (EOF.)

After much gnashing of the teeth, I gave up and saved without formatting and re-committed an as-is copy of Installomator.sh.

My proposal is to strip trailing/stray whitespace and add a newline at EOF on the main branch and ask contributors to do the same for their respective code blocks.

Screen Shot 2021-01-21 at 2 59 08 PM

Improved argument handling

Argument handling should allow for

  • multiple application labels to be passed
  • variables, such as DEBUG, NOTIFY, and BLOCKING_PROCESS_ACTION to be set with an argument
  • continue to auto-detect when running from Jamf Pro (or a different management system) and ignore arguments accordingly

xpath and big sur

the build of xpath (5.28) included with Big Sur (11.2.3) looks to require the "-e" flag to parse data. This isn't the case with xpath included with Catalina (5.18)

Usage:
/usr/bin/xpath5.28 [options] -e query [-e query...] [filename...]

And the -e flag doesn't seem to be a feature of 5.18

I noticed this with the Microsoft Autoupdate check, but any check that uses xpath is effected, so we'll need to add an if statement based on OS version to work around it.

Please double-check me though.

Atom Team ID error

I get a Team ID mismatch error when running the Atom install. The Application itself if downloaded and installed independently reports the same Team ID as the one in the script. So I am unsure where the mismatch is occurring.

Atom_installer

appNewVersion missing for Microsoft Office Business Pro?

Maybe I'm missing something (VERY LIKELY), but it looks like there's no appNewVersion for Office Biz Pro?

Shouldn't something like this go between lines 2905 & 2906 (or there abouts)...
appNewVersion=$( curl -fsIL "https://go.microsoft.com/fwlink/?linkid=2009112" | grep -i location: | grep -o "/Microsoft_.*pkg" | cut -d "_" -f 3 )

Jamf Pro: "reopenClosedProcess" launches apps as root

Hey there, dear Devs :-)

I could experience a few times, that reopenClosedProcess appears to launch apps as root in some circumstances, causing some strange behaviour. For example Google Chrome shows an error message regarding a missing Keychain or Thunderbird trying to open "/var/root/.gnupg".

The errors go away when the respective apps are quit and then reopened.

Experienced when ran as a script in Jamf Pro.

Jamf Pro log example for Google Chrome:

Script result: 2021-04-14 20:11:16  shifting arguments for Jamf
2021-04-14 20:11:16 googlechrome setting variable from argument DEBUG=0
2021-04-14 20:11:16 googlechrome setting variable from argument NOTIFY=silent
2021-04-14 20:11:16 googlechrome ################## Start Installomator v. 0.5.0
2021-04-14 20:11:16 googlechrome ################## googlechrome
2021-04-14 20:11:16 googlechrome Architecture: arm64 (not i386)
2021-04-14 20:11:17 googlechrome BLOCKING_PROCESS_ACTION=prompt_user
2021-04-14 20:11:17 googlechrome NOTIFY=silent
2021-04-14 20:11:17 googlechrome LOGO=/System/Applications/App Store.app/Contents/Resources/AppIcon.icns
2021-04-14 20:11:17 googlechrome no blocking processes defined, using Google Chrome as default
2021-04-14 20:11:17 googlechrome Changing directory to /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.4ZYctvf1
2021-04-14 20:11:20 googlechrome found app at /Applications/Google Chrome.app, version 89.0.4389.114
2021-04-14 20:11:20 googlechrome Latest version of Google Chrome is 89.0.4389.128
2021-04-14 20:11:20 googlechrome Downloading https://dl.google.com/chrome/mac/universal/stable/GGRO/googlechrome.dmg to Google Chrome.dmg
2021-04-14 20:11:27 googlechrome found blocking process Google Chrome
2021-04-14 20:11:32 googlechrome telling app Google Chrome to quit
2021-04-14 20:11:32 googlechrome waiting 30 seconds for processes to quit
2021-04-14 20:12:03 googlechrome no more blocking processes, continue with update
2021-04-14 20:12:03 googlechrome Installing Google Chrome
2021-04-14 20:12:03 googlechrome Mounting /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.4ZYctvf1/Google Chrome.dmg
2021-04-14 20:12:20 googlechrome Mounted: /Volumes/Google Chrome
2021-04-14 20:12:20 googlechrome Verifying: /Volumes/Google Chrome/Google Chrome.app
2021-04-14 20:12:34 googlechrome Team ID matching: EQHXZ8M8AV (expected: EQHXZ8M8AV )
2021-04-14 20:12:34 googlechrome Downloaded version of Google Chrome is 89.0.4389.128 (replacing version 89.0.4389.114).
2021-04-14 20:12:34 googlechrome Removing existing /Applications/Google Chrome.app
2021-04-14 20:12:34 googlechrome Copy /Volumes/Google Chrome/Google Chrome.app to /Applications
2021-04-14 20:12:43 googlechrome Changing owner to buehler
2021-04-14 20:12:53 googlechrome found app at /Applications/Google Chrome.app, version 89.0.4389.128
2021-04-14 20:12:53 googlechrome Installed Google Chrome, version 89.0.4389.128
2021-04-14 20:12:53 googlechrome Deleting /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.4ZYctvf1
2021-04-14 20:12:53 googlechrome Unmounting /Volumes/Google Chrome
"disk4" ejected.
2021-04-14 20:12:54 googlechrome Telling app Google Chrome to open
2021-04-14 20:12:54 googlechrome Reopened Google Chrome as root             78130   0.0  0.0 407972224   1136   ??  S     8:12PM   0:00.00 grep -i Google Chrome
buehler          78126   0.0  0.0 407962864     48   ??  S     8:12PM   0:00.00 /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
2021-04-14 20:12:54 googlechrome ################## End Installomator, exit code 0 

getAppVersion function-call in the bottom does not give any result

After my fix for mdfind I was wandering why the getAppVersion call in the bottom of the script does not find the newly installed app.

I had to add a sleep 2 line before. I guess the indexing is not done after the copy. I do not know if 2 seconds are enough, or a better check for the indexing should be done.

Make notification message template one or more variables

Rather than needing to alter the script itself when used (https://github.com/scriptingosx/Installomator/blob/dev/Installomator.sh#L1530-L1541), would like to see one or more custom variables be added to allow easier customization of the notification message presented, if enabled, for users.

Along these same lines, would like to be able to customize the application image. As it is now, within the context of a Jamf deployment, most users don't know Jamf or the Jamf Management logo, so it would be helpful to be able to either automatically use the the one used to customize Self Service, or simply provide a path to the desired image to be included in the message.

getAppVersion never finds anything

There is an error in the mdfind command in the getAppVersion function.
The applist variable should be defined like this:
applist=$(mdfind "kMDItemFSName='$appName' kMDItemKind='Application'" -0 )
The double "&&" should be eliminated. At least on my system, it never finds any app.

iTerm Team error

This is the error I am receiving upon trying to update/install iTerm2.

2020-07-08 16:17:10 ################## Start Installomator
2020-07-08 16:17:10 ################## iterm2
2020-07-08 16:17:10 no blocking processes defined, using iTerm as default
2020-07-08 16:17:10 Changing directory to /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.dnuSoPZe
2020-07-08 16:17:10 no more blocking processes, continue with update
2020-07-08 16:17:10 Downloading https://iterm2.com/downloads/stable/latest to iTerm.zip
2020-07-08 16:17:11 Unzipping iTerm.zip
2020-07-08 16:17:12 Verifying: /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.dnuSoPZe/iTerm.app
2020-07-08 16:17:12 Team ID: (expected: H7V7XYVQ7D )
2020-07-08 16:17:12 ERROR: Team IDs do not match
2020-07-08 16:17:12 Deleting /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.dnuSoPZe
2020-07-08 16:17:12 ################## End Installomator \n\n

Code42 producing "Error verifying Install Code42.pkg"

We've been using installomator to deploy Code42 for a while now, but just today started having an issue when deploying through Jamf.

We are currently using v0.4 of the script.

The issue itself appears to related to the installFromPKG function https://github.com/scriptingosx/Installomator/blob/dev/Installomator.sh#L396-L403.

Installomator output:

2020-11-18 17:41:45 ################## Start Installomator
2020-11-18 17:41:45 ################## code42
2020-11-18 17:41:45 Changing directory to /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.0ZoALxdL
2020-11-18 17:41:46 Spotlight not returning any app, trying manually in /Applications.
2020-11-18 17:41:46 could not find Code42.app
2020-11-18 17:41:46 Downloading https://download.code42.com/installs/agent/latest-mac.dmg to Code42.dmg
2020-11-18 17:43:26 Mounting /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.0ZoALxdL/Code42.dmg
2020-11-18 17:43:29 Mounted: /Volumes/Code42
2020-11-18 17:43:29 found pkg: /Volumes/Code42/Install Code42.pkg
2020-11-18 17:43:29 Verifying: /Volumes/Code42/Install Code42.pkg
2020-11-18 17:43:29 Error verifying /Volumes/Code42/Install Code42.pkg
2020-11-18 17:43:29 Deleting /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.0ZoALxdL
2020-11-18 17:43:29 Unmounting /Volumes/Code42
"disk14" ejected.
2020-11-18 17:43:29 ################## End Installomator 

The "Error verifying" message is produced when running spctl -a -vv -t install "$archiveName" 2>&1 but can confirm after copying the same PKG from my Mac after confirming the output:

spctl -a -vv -t install ~/Downloads/Install\ Code42.pkg 2>&1
/Users/apo/Downloads/Install Code42.pkg: accepted
source=Notarized Developer ID
origin=Developer ID Installer: Code 42 Software (9YV9435DHD)

Produces different output on the affected Mac:

On my Mac (running 10.15.7 19H2):

spctl -a -vv -t install ~/Downloads/Install\ Code42.pkg 2>&1
/Users/admin/Downloads/Install Code42.pkg: accepted
source=Notarized Developer ID
origin=Developer ID Installer: Code 42 Software (9YV9435DHD)

My suspicion after this discovery was that this was leftover from the Apple trustd issue from late last week, but after removing the temporarily added /etc/hosts line and running sudo dscacheutil -flushcache that the Mac in question is still reporting as rejected.

On target Mac (running 10.15.3):

spctl -a -vv -t install /Users/Shared/Code42.pkg
/Users/Shared/Code42.pkg: rejected
source=Unnotarized Developer ID
origin=Developer ID Installer: Code 42 Software (9YV9435DHD)

While this does not appear to be installomator related, I just wanted to report in the event others run into something similar.

TeamViewer Install Fails - Installer .app inside a DMG

Running TeamViewer installation fails over verifying TeamID because it looking for Install TeamViewer.pkg.
I guess it was the case a while ago.

2021-03-17 13:28:33 ################## Start Installomator
2021-03-17 13:28:33 ################## teamviewer
2021-03-17 13:28:33 no blocking processes defined, using TeamViewer as default
2021-03-17 13:28:33 Changing directory to /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.ypdiQAEy
2021-03-17 13:28:34 could not determine location of TeamViewer.app
2021-03-17 13:28:34 no more blocking processes, continue with update
2021-03-17 13:28:34 Downloading https://download.teamviewer.com/download/TeamViewer.dmg to TeamViewer.dmg
2021-03-17 13:28:41 Mounting /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.ypdiQAEy/TeamViewer.dmg
2021-03-17 13:28:43 Mounted: /Volumes/TeamViewer
2021-03-17 13:28:43 Verifying PKG: /Volumes/TeamViewer/Install TeamViewer.pkg
2021-03-17 13:28:43 Error verifying /Volumes/TeamViewer/Install TeamViewer.pkg
2021-03-17 13:28:43 Deleting /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.ypdiQAEy
2021-03-17 13:28:43 Unmounting /Volumes/TeamViewer
"disk8" ejected.
2021-03-17 13:28:43 ################## End Installomator

Add ability to use Jamf parameter values to override default NOTIFY and BLOCKING_PROCESS_ACTION values

The thought occurred to me that for desired software titles it may be necessary to allow setting the NOTIFY and BLOCKING_PROCESS_ACTION on a case-by-case basis rather than what the configured default was. Example would be using Jamf parameter values $4 & $5.

While I imagine most orgs employing Installomator for software installs could easily replace the values in their own Installomator scripts for this purpose or perhaps maintain separate installomator scripts for assigning different values to these variables, this enhancement would not require this.

The idea would be that there would be an additional check such that if a valid value were assigned to $4 for NOTIFY and $5 for BLOCKING_PROCESS_ACTION that this value would override the configured script default. If one or both of these values were present but not one of acceptable then the default would be used

This would achieve the following benefits:

  • Admins could maintain a single Installomator script with their desired default values for NOTIFY and BLOCKING_PROCESS_ACTION.
  • Admins on a per-policy basis could override these values by supplying an appropriate value for $4 or $5.
  • Admins who did not wish to take advantage of this feature would not have to change existing scripts
  • Admins who did want to take advantage of this feature would only have to update the parameter value names and apply the desired values for the select policies that needed this.
  • Admins who inadvertently provided an unacceptable value for either $4 or $5 would instead use their normal default behavior.

Code42 install: spctl weirdness

Not sure if this is something that can easily be fixed, as I can only replicate this with the Code42 install. Maybe #65 is the best fix for this, however:

I'm running into weird inconsistencies with spctl and the Code42 install.

When running 0.4 through Jamf I mostly get this result:

2020-08-26 08:35:04 ################## Start Installomator
2020-08-26 08:35:04 ################## Code42
2020-08-26 08:35:04 Changing directory to /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.YosnVTUw
2020-08-26 08:35:04 Spotlight not returning any app, trying manually in /Applications.
2020-08-26 08:35:04 could not find Code42.app
2020-08-26 08:35:04 Downloading https://download.code42.com/installs/agent/latest-mac.dmg to Code42.dmg
2020-08-26 08:36:44 Mounting /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.YosnVTUw/Code42.dmg
2020-08-26 08:36:46 Mounted: /Volumes/Code42
2020-08-26 08:36:46 found pkg: /Volumes/Code42/Install Code42.pkg
2020-08-26 08:36:46 Verifying: /Volumes/Code42/Install Code42.pkg
2020-08-26 08:36:46 Error verifying /Volumes/Code42/Install Code42.pkg
2020-08-26 08:36:46 Deleting /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.YosnVTUw
2020-08-26 08:36:46 Unmounting /Volumes/Code42
2020-08-26 08:36:46 ################## End Installomator 

If I don't trash the mounted volume and run spctl manually, I see why it fails:

spctl -a -vv -t install /Volumes/Code42/Install\ Code42.pkg 
/Volumes/Code42/Install Code42.pkg: rejected
source=Unnotarized Developer ID
origin=Developer ID Installer: Code 42 Software (9YV9435DHD)

This has been consistent, other than one time, where it installed fine.

Now, if I manually download the DMG from the same location, manually mount it and run spctl, I always end up with this result:

pctl -a -vv -t install /Volumes/Code42/Install\ Code42.pkg                 
/Volumes/Code42/Install Code42.pkg: accepted
source=Notarized Developer ID
origin=Developer ID Installer: Code 42 Software (9YV9435DHD)

Not sure what is causing the difference here (part of me wants to blame Electron), but I'd be more than happy to provide other info!

Finding Team ID

Suggestion

It seems to be faster to find the TeamID using this command:
codesign -dr - /path/to/app.app

Don't know the implications otherwise.

Adobe Reader DC download fails + installer complications

I've noticed three problems with the Adobe Reader DC item:

  1. The download URL appears to be incorrect
2020-06-12 13:17:17 ################## adobereaderdc
2020-06-12 13:17:17 Changing directory to /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.8tXeI4TN
2020-06-12 13:17:17 found app at /Applications/Adobe Acrobat Reader DC.app, version 19.008.20071
2020-06-12 13:17:17 no more blocking processes, continue with update
2020-06-12 13:17:17 Downloading http://ardownload.adobe.com/pub/adobe/reader/mac/AcrobatDC/2000920067/AcroRdrDC_2000920067_MUI.dmg to Adobe Acrobat Reader DC.dmg
2020-06-12 13:17:18 error downloading http://ardownload.adobe.com/pub/adobe/reader/mac/AcrobatDC/2000920067/AcroRdrDC_2000920067_MUI.dmg
2020-06-12 13:17:18 Deleting /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.8tXeI4TN
2020-06-12 13:17:18 ################## End Installomator

I found this URL instead (from Adobe Enterprise Toolkit):
https://ardownload2.adobe.com/pub/adobe/reader/mac/AcrobatDC/2000920067/AcroRdrDCUpd2000920067_MUI.dmg

  1. The package from the URL I found can only update an existing install on the system

From the Installomator log:

2020-06-12 14:58:02 ################## adobereaderdc
2020-06-12 14:58:02 Changing directory to /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.UW7JKKZI
2020-06-12 14:58:02 could not find Adobe Acrobat Reader DC.app
2020-06-12 14:58:02 no more blocking processes, continue with update
2020-06-12 14:58:02 Downloading http://ardownload2.adobe.com/pub/adobe/reader/mac/AcrobatDC/2000920067/AcroRdrDCUpd2000920067_MUI.dmg to Adobe Acrobat Reader DC.dmg
2020-06-12 14:58:39 Mounting /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.UW7JKKZI/Adobe Acrobat Reader DC.dmg
2020-06-12 14:58:39 Y

2020-06-12 14:58:45 found pkg: /Volumes/AcroRdrDCUpd2000920067_MUI/AcroRdrDCUpd2000920067_MUI.pkg
2020-06-12 14:58:45 Verifying: /Volumes/AcroRdrDCUpd2000920067_MUI/AcroRdrDCUpd2000920067_MUI.pkg
2020-06-12 14:58:46 Team ID: JQ525L2MZD (expected: JQ525L2MZD )
2020-06-12 14:58:46 Installing /Volumes/AcroRdrDCUpd2000920067_MUI/AcroRdrDCUpd2000920067_MUI.pkg to /
2020-06-12 14:58:52 error installing /Volumes/AcroRdrDCUpd2000920067_MUI/AcroRdrDCUpd2000920067_MUI.pkg
2020-06-12 14:58:52 Deleting /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.UW7JKKZI
2020-06-12 14:58:52 Unmounting /Volumes/AcroRdrDCUpd2000920067_MUI
2020-06-12 14:58:52 ################## End Installomator

From the install log:

2020-06-12 14:58:51+02 installd[1224]: PackageKit: Install Failed: Error Domain=PKInstallErrorDomain Code=112 "An error occurred while running scripts from the package “AcroRdrDCUpd2000920067_MUI.pkg”." UserInfo={NSFilePath=./preinstall, NSURL=file://localhost/Volumes/AcroRdrDCUpd2000920067_MUI/AcroRdrDCUpd2000920067_MUI.pkg#payload.pkg, PKInstallPackageIdentifier=com.adobe.acrobat.AcroRdrDCUpd2000920067_MUI, NSLocalizedDescription=An error occurred while running scripts from the package “AcroRdrDCUpd2000920067_MUI.pkg”.} {
	    NSFilePath = "./preinstall";
	    NSLocalizedDescription = "An error occurred while running scripts from the package \U201cAcroRdrDCUpd2000920067_MUI.pkg\U201d.";
	    NSURL = "file://localhost/Volumes/AcroRdrDCUpd2000920067_MUI/AcroRdrDCUpd2000920067_MUI.pkg#payload.pkg";
	    PKInstallPackageIdentifier = "com.adobe.acrobat.AcroRdrDCUpd2000920067_MUI";
	}
2020-06-12 14:58:51+02 installd[1224]: PackageKit: Running idle tasks
2020-06-12 14:58:51+02 installer[24396]: install:didFailWithError:Error Domain=PKInstallErrorDomain Code=112 "An error occurred while running scripts from the package “AcroRdrDCUpd2000920067_MUI.pkg”." UserInfo={NSFilePath=./preinstall, NSURL=file://localhost/Volumes/AcroRdrDCUpd2000920067_MUI/AcroRdrDCUpd2000920067_MUI.pkg#payload.pkg, PKInstallPackageIdentifier=com.adobe.acrobat.AcroRdrDCUpd2000920067_MUI, NSLocalizedDescription=An error occurred while running scripts from the package “AcroRdrDCUpd2000920067_MUI.pkg”.}
2020-06-12 14:58:51+02 installd[1224]: PackageKit: Removing client PKInstallDaemonClient pid=24396, uid=0 (/usr/sbin/installer)
2020-06-12 14:58:51+02 installd[1224]: PackageKit: Done with sandbox removals
2020-06-12 14:58:52+02 installer[24396]: Install failed: The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance.

When executing the installer in the GUI it prompts for the location of an existing app bundle.
I suspect I haven't dug deep enough on the Adobe website and there's another list somewhere with full installers instead of just the updates. I'll keep looking...

  1. If Adobe Reader is running, it doesn't quit when the user clicks the button to quit and update

From the log (each time the dialog appeared, I clicked "Quit & Update"):

2020-06-12 12:45:06 ################## adobereaderdc
2020-06-12 12:45:06 Changing directory to /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.60vS7LLX
2020-06-12 12:45:07 found app at /Applications/Adobe Acrobat Reader DC.app, version 19.008.20071
2020-06-12 12:45:10 waiting 30 seconds for processes to quit
2020-06-12 12:45:42 waiting 30 seconds for processes to quit
2020-06-12 12:46:16 waiting 30 seconds for processes to quit
2020-06-12 12:46:46 ERROR: could not quit all processes, aborting...
2020-06-12 12:46:46 Deleting /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.60vS7LLX
2020-06-12 12:46:46 ################## End Installomator

Add ability to reopen app after update completes

There are two scenarios that I would like to see addressed as part of this request:

  1. If the app is detected to be running and the user opts to quit & update the app, if an additional command line flag is provided (something like --relaunch-app) that Installomator will reopen the app (open -a "<App Name>") once the app has been updated.
  2. If the script is run as part of a Jamf policy, add another parameter to specify one or more flags to accommodate this and potentially other CLI options.

In the case of a recent addition - sizeup - the app runs in the menubar and by and large isn't really noticeable until you need to use it. Want to save users who are doing the right thing by updating their software to not then have to manually relaunch it or realize when they try to use it that it's not running.

Create installation package to install Installomator.sh locally

Some management systems (e.g. Mostly) cannot run scripts with changeable arguments. In this case it is easier to install the Installomator script locally.

  • Add a workflow (script) that builds a pkg installer which drops Installomator on the disk (location? I would suggest /usr/local/Installomator/Installomator.sh
  • Add pkg to release resources

What if the user is already running the latest version?

What happens if I trigger Installomator on a system that happens to already be running the latest version?

Does it download the software anyway, since it may need to do that to know if the version is latest?

Does it try to install the software regardless?

I'm wondering how careful you should be in NOT scheduling this to trigger too often on a schedule if you don't know if the user needs the update. Would be nice to document this aspect.

I did read over the code, but couldn't quite tell what happens. I haven't tested it yet, but would like to do so.

It would be interesting to save etag data for the downloads somewhere and check that BEFORE redownloading the software again, but perhaps with a flag to force reinstall.

Google Drive File Stream

Google Drive File Stream installs fail with a Team ID mismatch.

`./Installomator.sh googledrivefilestream

no blocking processes defined, using Google Drive File Stream as default

Changing directory to /var/folders/bs/d7hl_c0d5fs8gr19vgy1bj1h0000gn/T/tmp.6NAWwcQ8

could not find Google Drive File Stream.app

no more blocking processes, continue with update

Downloading https://dl.google.com/drive-file-stream/GoogleDriveFileStream.dmg to Google Drive File Stream.dmg

Mounting /var/folders/bs/d7hl_c0d5fs8gr19vgy1bj1h0000gn/T/tmp.6NAWwcQ8/Google Drive File Stream.dmg

Mounted: /Volumes/Install Google Drive File Stream

Verifying: /Volumes/Install Google Drive File Stream/”GoogleDriveFileStream.pkg”

Team ID:  (expected: EQHXZ8M8AV )

Team IDs do not match!

Deleting /var/folders/bs/d7hl_c0d5fs8gr19vgy1bj1h0000gn/T/tmp.6NAWwcQ8

Unmounting /Volumes/Install Google Drive File Stream

"disk2" ejected.`

[Enhancement] Alphabetize items

Maybe I'm OCD, but when looking through the supported install items it would be great if these were sorted alphabetically.

Version checking before quitting app?

Not really an issue, but a feature request.

Wish that the user would not be asked to quit the given app, if the app does not need an update. Maybe it does not need to download the app either?

Could be done somehow by adding a line, that would figure out latest version of the download, if it can be scripted before download. Lates version of signal is this:
curl -fs https://updates.signal.org/desktop/latest-mac.yml | grep version | awk '{print $2}'

How would the admin know if the apps needs to be updated? I dream I could be lazy and run the command every morning or once per week or something, and only bug the user if the app actually needs an update.

(I realise that through Jamf Pro I can limit the target machines, but then Jamf Pro needs to know the latest version.)

check for root earlier when not in debug mode

When testing a new label, I test locally in debug mode first. If everything looks good there, I test locally with debug mode off before loading it up in Jamf. If I forget to run as root, I have to wait for the whole download, verification, etc. before the error, ERROR: not running as root, exiting.

It would be helpful to get that error at the beginning of the process, so I don't have to wait another 8 minutes to test. :-/

(And, also, because I'm a goober that can't remember to run it with sudo.) :-P

Webex teams failing

Installing Webex Teams seems not to work. I think the .dmg file is no longer available without logging in.

Latest v0.5 script assumes previous version installed in script output

Was just testing latest installomator and noticed that there's output which assumes a previous version is installed. In my case, I temporarily removed my existing version of an app as if it were a fresh install:

Running script Installomator-v.5...
Script exit code: 0
Script result: 2021-03-31 13:46:28  shifting arguments for Jamf
2021-03-31 13:46:28 visualstudiocode ################## Start Installomator v. 0.5.0
2021-03-31 13:46:28 visualstudiocode ################## visualstudiocode
2021-03-31 13:46:29 visualstudiocode BLOCKING_PROCESS_ACTION=silent_fail
2021-03-31 13:46:29 visualstudiocode NOTIFY=silent
2021-03-31 13:46:29 visualstudiocode LOGO=/Library/Application Support/JAMF/Jamf.app/Contents/Resources/AppIcon.icns
2021-03-31 13:46:29 visualstudiocode Changing directory to /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.93md1dIi
2021-03-31 13:46:29 visualstudiocode Spotlight not returning any app, trying manually in /Applications.
2021-03-31 13:46:29 visualstudiocode could not find Visual Studio Code.app
2021-03-31 13:46:29 visualstudiocode Latest version of Visual Studio Code is 1.54.3
2021-03-31 13:46:29 visualstudiocode Downloading https://go.microsoft.com/fwlink/?LinkID=2156837 to Visual Studio Code.zip
2021-03-31 13:46:32 visualstudiocode no more blocking processes, continue with update
2021-03-31 13:46:32 visualstudiocode Installing Visual Studio Code
2021-03-31 13:46:32 visualstudiocode Unzipping Visual Studio Code.zip
2021-03-31 13:46:35 visualstudiocode Verifying: /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.93md1dIi/Visual Studio Code.app
2021-03-31 13:46:37 visualstudiocode Team ID matching: UBF8T346G9 (expected: UBF8T346G9 )
2021-03-31 13:46:37 visualstudiocode Downloaded version of Visual Studio Code is 1.54.3 (replacing version ).
2021-03-31 13:46:37 visualstudiocode Copy /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.93md1dIi/Visual Studio Code.app to /Applications
2021-03-31 13:46:38 visualstudiocode Changing owner to apo
2021-03-31 13:46:49 visualstudiocode found app at /Applications/Visual Studio Code.app, version 1.54.3
2021-03-31 13:46:49 visualstudiocode Installed Visual Studio Code, version 1.54.3
2021-03-31 13:46:49 visualstudiocode Deleting /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.93md1dIi
2021-03-31 13:46:49 visualstudiocode ################## End Installomator, exit code 0 

The applicable line: 2021-03-31 13:46:37 visualstudiocode Downloaded version of Visual Studio Code is 1.54.3 (replacing version ). Should be tweaked slightly for fresh install since we're not replacing an already existing app.

Can't update MAS version of 1Password 7

I'm not sure if this problem is related to MAS apps in general or 1Password 7 specifically.

I had previously installed the MAS version of 1Password via Jamf and used that with no problems. I tried to replace that with their web site version (added functionality) via Installomator v. 0.4 (via Jamf policy and separately independent of Jamf). Either way, I get the "Quit and Update" dialog box and select that option. After 3 tries, it fails. I tried checking Activity Monitor and adding "blocking processes" and ended up with this label:

1password7)
    name="1Password 7"
    type="pkg"
    downloadURL="https://app-updates.agilebits.com/download/OPM7"
    expectedTeamID="2BUA8C4S2C"
    blockingProcesses=( "1Password 7" "1Password Extension Helper" "1PasswordNativeMessageHost" "1Password (Safari)" )
    ;;

Installomator succeeded after I manually deleted 1Password 7 from /Applications.

Screenshots:
Screen Shot 2020-11-18 at 11 11 42 AM
Screen Shot 2020-11-18 at 3 02 59 PM
Screen Shot 2020-11-18 at 3 06 33 PM

That last screenshot is what I got when I first tried to drag 1Password to the Trash. After killing all the processes via Activity Monitor, I was able to delete it.

Jamf's error before adding blocking processes:

[STEP 1 of 5]
--
Executing Policy 1Password-Installomator
[STEP 2 of 5]
Running script Installomator...
Script exit code: 11
Script result: 2020-11-18 11:11:27 shifting arguments for Jamf
2020-11-18 11:11:27 ################## Start Installomator 
2020-11-18 11:11:27 ################## 1password7 
2020-11-18 11:11:27 no blocking processes defined, using 1Password 7 as default 
2020-11-18 11:11:27 Changing directory to /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.Rnw5UIpL 
2020-11-18 11:11:28 found app at /Applications/1Password 7.app, version 7.6 
2020-11-18 11:11:28 found blocking process 1Password 7 
2020-11-18 11:11:44 telling app 1Password 7 to quit 26:30: execution error: 1Password 7 got an error: User canceled. (-128)
2020-11-18 11:11:45 waiting 30 seconds for processes to quit 
2020-11-18 11:12:15 found blocking process 1Password 7 
2020-11-18 11:13:40 telling app 1Password 7 to quit 26:30: execution error: 1Password 7 got an error: User canceled. (-128)
2020-11-18 11:13:41 waiting 30 seconds for processes to quit 
2020-11-18 11:14:11 found blocking process 1Password 7 
2020-11-18 11:14:15 telling app 1Password 7 to quit 26:30: execution error: 1Password 7 got an error: User canceled. (-128)
2020-11-18 11:14:15 waiting 30 seconds for processes to quit 
2020-11-18 11:14:45 ERROR: could not quit all processes, aborting... 
2020-11-18 11:14:45 Deleting /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.Rnw5UIpL 
2020-11-18 11:14:45 ################## End Installomator
Error running script: return code was 11.
[STEP 3 of 5]
[STEP 4 of 5]
Inventory will be updated when all queued actions in Self Service are complete.
[STEP 5 of 5]

Jamf's error with the blocking processes added:

[STEP 1 of 5]
--
Executing Policy 1Password-Installomator
[STEP 2 of 5]
Running script Installomator...
Script exit code: 11
Script result: 2020-11-18 15:03:19 shifting arguments for Jamf
2020-11-18 15:03:19 ################## Start Installomator 
2020-11-18 15:03:19 ################## 1password7 
2020-11-18 15:03:19 Changing directory to /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.onDI3Rjp 
2020-11-18 15:03:19 found app at /Applications/1Password 7.app, version 7.6 
2020-11-18 15:03:19 found blocking process 1PasswordNativeMessageHost 
2020-11-18 15:03:26 telling app 1PasswordNativeMessageHost to quit 
2020-11-18 15:03:26 waiting 30 seconds for processes to quit 
2020-11-18 15:03:56 found blocking process 1PasswordNativeMessageHost 
2020-11-18 15:03:59 telling app 1PasswordNativeMessageHost to quit 
2020-11-18 15:03:59 waiting 30 seconds for processes to quit 
2020-11-18 15:04:29 found blocking process 1PasswordNativeMessageHost 
2020-11-18 15:04:32 telling app 1PasswordNativeMessageHost to quit 
2020-11-18 15:04:33 waiting 30 seconds for processes to quit 
2020-11-18 15:05:03 ERROR: could not quit all processes, aborting... 
2020-11-18 15:05:03 Deleting /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.onDI3Rjp 
2020-11-18 15:05:03 ################## End Installomator
Error running script: return code was 11.
[STEP 3 of 5]
[STEP 4 of 5]
Inventory will be updated when all queued actions in Self Service are complete.
[STEP 5 of 5]

Terminal error:

2020-11-18 14:33:31 ################## Start Installomator
2020-11-18 14:33:31 ################## 1password7
2020-11-18 14:33:31 no blocking processes defined, using 1Password 7 as default
2020-11-18 14:33:31 Changing directory to /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.8OgFDEgJ
2020-11-18 14:33:31 found app at /Applications/1Password 7.app, version 7.6
2020-11-18 14:33:31 found blocking process 1Password 7
2020-11-18 14:33:35 telling app 1Password 7 to quit
26:30: execution error: 1Password 7 got an error: User canceled. (-128)
2020-11-18 14:33:35 waiting 30 seconds for processes to quit
2020-11-18 14:34:05 found blocking process 1Password 7
2020-11-18 14:34:18 ERROR: user aborted update
2020-11-18 14:34:18 Deleting /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.8OgFDEgJ
2020-11-18 14:34:18 ################## End Installomator 

It succeeded after I manually deleted 1Password 7 from /Applications.


[STEP 1 of 5]
--
Executing Policy 1Password-Installomator
[STEP 2 of 5]
Running script Installomator...
Script exit code: 0
Script result: 2020-11-18 15:09:24 shifting arguments for Jamf
2020-11-18 15:09:24 ################## Start Installomator 2020-11-18 15:09:24 ################## 1password7 2020-11-18 15:09:24 Changing directory to /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.zZPMu1g4 
2020-11-18 15:09:24 Spotlight not returning any app, trying manually in /Applications. 
2020-11-18 15:09:24 could not find 1Password 7.app 
2020-11-18 15:09:24 no more blocking processes, continue with update 
2020-11-18 15:09:24 Downloading https://app-updates.agilebits.com/download/OPM7 to 1Password 7.pkg 
2020-11-18 15:10:06 Verifying: 1Password 7.pkg 
2020-11-18 15:10:06 Team ID: 2BUA8C4S2C (expected: 2BUA8C4S2C ) 
2020-11-18 15:10:06 Installing 1Password 7.pkg to / installer: Package name is 1Password 7 installer: Installing at base path / installer: The install was successful. 
2020-11-18 15:10:29 found app at /Applications/1Password 7.app, version 7.7 
2020-11-18 15:10:30 Installed 1Password 7, version 7.7 
2020-11-18 15:10:30 notifying 2020-11-18 15:10:34 Deleting /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.zZPMu1g4 
2020-11-18 15:10:34 ################## End Installomator
[STEP 3 of 5]
[STEP 4 of 5]
Inventory will be updated when all queued actions in Self Service are complete.
[STEP 5 of 5]

Mosyle integration

Has anyone been successful using Installomator with Mosyle MDM ? I was thinking of copying an Installomator directory with the script in it in /Users/Shared and then invoking it with a custom command. I wonder if there is a better way. Thanks for your insights.

Gimp not installing

2021-03-31 13:47:46 gimp ################## Start Installomator v. 0.5.0
2021-03-31 13:47:46 gimp ################## gimp
2021-03-31 13:47:47 gimp BLOCKING_PROCESS_ACTION=silent_fail
2021-03-31 13:47:47 gimp NOTIFY=silent
2021-03-31 13:47:47 gimp LOGO=/System/Applications/App Store.app/Contents/Resources/AppIcon.icns
2021-03-31 13:47:47 gimp no blocking processes defined, using GIMP as default
2021-03-31 13:47:47 gimp Changing directory to /var/folders/1d/4ct_4yn13r5c92xbryx55t945mjl98/T/tmp.ujUpt8ch
2021-03-31 13:47:47 gimp found app at /Applications/GIMP.app, version 2.10.10
2021-03-31 13:47:47 gimp Latest version of GIMP is 2.10.22
2021-03-31 13:47:47 gimp Downloading https://download.gimp.org/pub/gimp/v2.10/osx/gimp-2.10.22-x86_64-3.dmg to GIMP.dmg
2021-03-31 13:47:49 gimp no more blocking processes, continue with update
2021-03-31 13:47:49 gimp Installing GIMP
2021-03-31 13:47:49 gimp Mounting /var/folders/1d/4ct_4yn13r5c92xbryx55t945mjl98/T/tmp.ujUpt8ch/GIMP.dmg
2021-03-31 13:48:02 gimp Mounted: /Volumes/GIMP 2.10 Install
2021-03-31 13:48:02 gimp ERROR: could not find: /Volumes/GIMP 2.10 Install/GIMP.app
2021-03-31 13:48:02 gimp Deleting /var/folders/1d/4ct_4yn13r5c92xbryx55t945mjl98/T/tmp.ujUpt8ch
2021-03-31 13:48:02 gimp Unmounting /Volumes/GIMP 2.10 Install
"disk6" ejected.
2021-03-31 13:48:02 gimp ################## End Installomator, exit code 8

Make checking notarization optional

Some apps and archives come signed, but not notarized, there could be an option to disable checking notarization, but just verify the signature and compare team IDs

Silent install

Would be nice to have a --silent flag to install without the final notification that the app was installed.

Support for universal apps

If you have an app that is already supported by Apple silicon, you can use it.
If there are apps that are already compatible with Apple silicon,
please make it possible to automatically determine the CPU and automatically install and update apps with the appropriate architecture.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.