Wednesday, May 11, 2016

Extending App Update Tool

Extension Attribute
The first Article was about the App Update Tool.  It's a suite of scripts to allow you to update applications on your Mac.  This article will describe the Extension Attribute included with those scripts.

I wanted to know if the App Update Tool was running properly on computers.  Perhaps the LaunchD was removed? Perhaps a user edited or deleted the script so it would stop interruption of other work? 

In the Download Package is the Extension Attribute (EA) called 'UpdateToolEA.sh'.  If you are unfamiliar with JAMF Extension Attributes, they are scripts which run on machines when the 'Run Inventory' once a day and return whatever result they are configured to return.

This EA returns "Running OK" if all looks good, else it'll return if something has been edited or not running.  I have a Smart Group of 'Not 'running ok'' and just reinstall the client package on those machines. 

If you edit any of the client side scripts, you'll need to generate the MD5 of that file and add that to the EA.  To do that,
Go to a client machine which has the client scripts as you want them (you done making any edits?).  Then type
myMac$ md5 -q /usr/local/updateTool/updateInstaller.sh
b28d74377f41a6994f521b422e21d56f
That MD5 value will change if the script is edited.  So copy/paste that into the Extension Attribute.  The three scripts are
/usr/local/updateTool/updateInstaller.sh
/usr/local/updateTool/updateKicker-overdue.sh
/usr/local/updateTool/updateKicker-popup.sh 

There are three LaunchDaemons to start each of those scripts. 
/Library/LaunchDaemons/edu.todd.ll.updateToolInstaller.plist
/Library/LaunchDaemons/edu.todd.ll.updateToolKickerGUI.plist
/Library/LaunchDaemons/edu.todd.ll.updateToolKickerOverDue.plist
type md5 -q for each of those to get the correct MD5 to enter into your EA.

You can find the Extension Attribute in the Download Package App Update Tool.  Edit the EA so the correct MD5 values are in it.

No comments:

Post a Comment