diff --git a/teamviewer-host-install-auth.sh b/teamviewer-host-install-auth.sh new file mode 100644 index 0000000..714efbf --- /dev/null +++ b/teamviewer-host-install-auth.sh @@ -0,0 +1,41 @@ +## PURPLE CUSTOMCOMMAND TEMPLATE ## +##-------------------------------## +##-------------------------------## +## SET VARIABLES ## + +APPNAME='TeamViewer' +TVCOMPUTERGROUP="Group Name from TeamViewer Computers & Contacts" +TVAPITOPKEN="00000000-aaabbbcccdddeeefff" +TVPKGCODE="" # CODE FROM THE URL AS PER HERE https://dl.tvcdn.de/download/version_15x/CustomDesign/Install%20TeamViewerHost-[[TVPKGCODE]].pkg +TVCOMPUTERNAME="%LastConsoleUser%-%ProductName%" +##-------------------------------## +## RUN SCRIPT ## +##-------------------------------## + +cd /tmp +cat << EOF > choices.xml + + + + attributeSetting 1 choiceAttribute selected choiceIdentifier com.teamviewer.teamviewerhostSilentInstaller + + +EOF + +killall TeamViewer + +rm -rf /Applications/TeamViewer* + +curl -L https://dl.tvcdn.de/download/version_15x/CustomDesign/Install%20TeamViewerHost-$TVPKGCODE.pkg -o Install%20TeamViewerHost-$TVPKGCODE.pkg +installer -applyChoiceChangesXML choices.xml -pkg Install%20TeamViewerHost-$TVPKGCODE.pkg -target / + +echo "10 seconds wait" +sleep 10 +echo "Assigning TeamViewer Device to our Account..." >> /var/tmp/depnotify.log +echo "Running the account assignment" + +sudo /Applications/TeamViewerHost.app/Contents/Helpers/TeamViewer_Assignment -api-token $TVAPITOKEN -alias $TVCOMPUTERNAME -group $TVCOMPUTERGROUP -grant-easy-access +sleep 5 + +# END SCRIPT WITH SUCCESS +exit 0