Hi,
I am currently trying to replace Teamviewer 12 Host with Teamviewer 14 Host.
I previously found a script on here and got it to work using Dropbox to host the PKG and Assignment files, as seen in the below script. Teamviewer have now bundled the Assignment file with the installer but trying to call this doesn't seem to work via Jamf. If I run it in Terminal, or from a local script file it will work but neither option works when calling from Jamf.
I can continue Installing v12 and then running the v14 installer on top, which will retain the assignment but I'd rather it was installing cleanly on new devices.
Run Assignment Tool (trying to run this directly from Jamf)
/Applications/TeamViewerHost.app/Contents/Helpers/TeamViewer_Assignment -api-token *******-********************* -group-id g******** -alias "${ComputerName}" -grant-easy-access -wait 10
or creating a PKG to drop the Assign.sh file locally and calling it via the Jamf script
sh "/Library/Application Support/TV/Assign.sh"
full script:
#!/bin/bash
#This will get the computer name
ComputerName=$(/usr/sbin/scutil --get ComputerName)
#This will download the items needed to install and configure Teamviewer
set -eux
mkdir -p /Users/Shared/Teamviewer
cd /Users/Shared/Teamviewer
curl -L https://www.dropbox.com/s/*******************************.pkg?dl=1 -o Install%20TeamViewerHost-idc**x******.pkg
# curl -L https://www.dropbox.com/s/**********************************?dl=1 -o TeamViewer_Assignment
# Install Teamviewer and give launch permissions to Teamviewer_Assignment
# chmod +x TeamViewer_Assignment
/usr/sbin/installer -pkg "/Users/Shared/Teamviewer/Install%20TeamViewerHost-idc**x****.pkg" -target /
#Start Teamviewer Services
launchctl load /Library/LaunchDaemons/com.teamviewer.teamviewer_service.plist
launchctl load /Library/LaunchAgents/com.teamviewer.teamviewer_desktop.plist
launchctl load /Library/LaunchAgents/com.teamviewer.teamviewer.plist
#Shutdown Teamviewer Services
launchctl unload /Library/LaunchDaemons/com.teamviewer.teamviewer_service.plist
launchctl unload /Library/LaunchAgents/com.teamviewer.teamviewer_desktop.plist
launchctl unload /Library/LaunchAgents/com.teamviewer.teamviewer.plist
#Run Assignment Tool (both commented out for now as neither work)
#/Applications/TeamViewerHost.app/Contents/Helpers/TeamViewer_Assignment -api-token *******-********************* -group-id g******** -alias "${ComputerName}" -grant-easy-access -wait 10
#sh "/Library/Application Support/TV/Assign.sh"
#Launch TeamViewer Service
launchctl load /Library/LaunchDaemons/com.teamviewer.teamviewer_service.plist
launchctl load /Library/LaunchAgents/com.teamviewer.teamviewer_desktop.plist
launchctl load /Library/LaunchAgents/com.teamviewer.teamviewer.plist
#Cleanup
rm -rf "/Users/Shared/Teamviewer"
In Jamf logs I see Error running script: return code was 206.
Hopefully someone can point me in the right direction!
Thanks
David