Posted on 02-08-2021 12:53 PM
Hey Everyone, I am battling with Webex teams simply trying to get it to deploy via self service. No matter what I try it just doesn't go despite reporting installed in the logs. I have tried uploading it via Jamf Admin as is in dmg form and attempted to create a pkg from the .app extracted from the dmg but no luck there either. Any advice would be greatly appreciated.
Posted on 02-08-2021 01:07 PM
Just use a script to download and install it all at once and forget about the packge:
#!/bin/bash loggedInUser=$( echo "show State:/Users/ConsoleUser" | scutil | awk '/Name :/ && ! /loginwindow/ { print $3 }' ) if [[ -z "$loggedInUser" ]] || [[ "$loggedInUser" == 'root' ]] || [[ "$loggedInUser" == "loginwindow" ]] ; then echo "Failed to gather loggedInUser correctly" exit 1 else echo "loggedInUser is $loggedInUser" fi loggedInUID=$(id -u "$loggedInUser") dmgfile="Webex.dmg" volname="Webex" appname="Webex.app" logfile="/Library/Logs/WebexInstallScript.log" url='https://binaries.webex.com/WebexTeamsDesktop-MACOS-Gold/Webex.dmg' /bin/echo "--" >> ${logfile} /bin/echo "date
: Downloading latest version." >> ${logfile} /usr/bin/curl -s -o /tmp/${dmgfile} ${url} /bin/echo "date
: Mounting installer disk image." >> ${logfile} /usr/bin/hdiutil attach /tmp/${dmgfile} -nobrowse -quiet /bin/echo "date
: Installing..." >> ${logfile}copy the app from disk image
/usr/bin/ditto -rsrc "/Volumes/$volname/$appName" "/Applications/$appName" /bin/sleep 10 /bin/echo "date
: Unmounting installer disk image." >> ${logfile} /usr/bin/hdiutil detach $(/bin/df | /usr/bin/grep "${volname}" | awk '{print $1}') -quiet /bin/sleep 10 /bin/echo "date
: Deleting disk image." >> ${logfile} /bin/rm /tmp/"${dmgfile}" exit 0
Posted on 02-08-2021 02:07 PM
That worked perfectly. Thank you so much for your assistance.
Posted on 02-09-2021 01:43 AM
Not to upend the good work by @ooshnoo ; but there was an unmatched variable in that script that might cause some issues. I've cleaned it up a little and made the logging a little more friendly for a Jamf Policy.
#!/bin/sh
loggedInUser=$( echo "show State:/Users/ConsoleUser" | scutil | awk '/Name :/ && ! /loginwindow/ { print $3 }' )
dmgfile="Webex.dmg"
volname="Webex"
appname="Webex.app"
if [ -z "$loggedInUser" ] && [ "$loggedInUser" = "root" ] && [ "$loggedInUser" = "loginwindow" ]; then
echo "Failed to gather loggedInUser correctly"
exit 1
else
echo "loggedInUser is $loggedInUser"
fi
url='https://binaries.webex.com/WebexTeamsDesktop-MACOS-Gold/Webex.dmg'
echo "--"
echo "Downloading latest version."
/usr/bin/curl -s -o /tmp/${dmgfile} ${url}
echo "Mounting installer disk image."
/usr/bin/hdiutil attach /tmp/${dmgfile} -nobrowse -quiet
echo "Installing..."
/usr/bin/ditto -rsrc "/Volumes/$volname/$appname" "/Applications/$appname"
/bin/sleep 5
echo "Unmounting installer disk image."
/usr/bin/hdiutil detach "$(/bin/df | /usr/bin/grep "${volname}" | awk '{print $1}')" -quiet
/bin/sleep 5
echo "Deleting disk image."
/bin/rm /tmp/"${dmgfile}"
exit 0
Posted on 02-09-2021 06:20 AM
@mcrispin thanks dude. My script was a meshing of 2 others I'd used, so I doesn't surprise me that I missed something.
Posted on 06-29-2021 09:47 AM
@mcrispin That scrip[t looks great, but how can I do this through Self Service? Thanks in advance for your help!