Hello JAMF Nation,
Currently, I have Adobe RUM setup in Self Service so our end users can update their Adobe CC apps anytime. The experience is not very friendly. The process kicks off but the user is never notified if updates have run or not.
I am attempting a script that will first check for updates, then give the user some actions based on whether or not available updates are found. My bash scripting is limited but I have even less experience with AppleScript. I currently, have 2 problems:
No matter the result of the remoteupdatemanager --action=list command the "Updates Available" dialog is always given. It's almost as if the grep is being ignored.
When the Run Updates button is clicked I get the following result: 598:649: execution error: System Events got an error: RemoteUpdateManager exiting with Return Code (1) (1)
When running the script from Terminal I have to sudo. But with Self Service sudo should't be necessary.
Any help would be appreciated. Thanks!
#!/bin/bash
/usr/bin/osascript << EOF
tell application "System Events"
set grepResults to 0
#Checks if there are available Adobe updates.
try
set grepResults to do shell script "usr/local/bin/remoteupdatemanager --action=list | grep Following Updates are applicable on the system"
end try
#If Updates are found. User is prompted and give the option to run the updates. If no updates found user is noitified ad given the option to click OK and exit.
if grepResults = 0 then
display dialog "Updates Availalbe!" buttons {"Run Updates", "Cancel"} default button 1
if result = {button returned:"Run Updates"} then
do shell script "usr/local/bin/remoteupdatemanager"
else
display dialog "No updates available from Adobe at this time." buttons {"OK"} default button "OK"
end if
end if
end tell
eof