Test -f /Library/Preferences/.lockfile & rm -f /Library/Preferences/.lockfile
Miller # Remove old TeamViewer Settings File and lockfile if it exists test -f /Library/Preferences/ & rm -f /Library/Preferences/
#!/bin/bash # Post Instal Script to remove extra files from TeamViewer # Upgrade by Joshua D. Listed below is a script you can use to remove these extra files as well as the customizations that may be left behind from TeamViewer 8. We will still define a post_install script as with this method the TeamViewer 8 settings file is left behind as well as a conversion file that it uses called. If you would like to define something I would suggest defining it in the version 8 script to avoid any issues. We will NOT need to define a preinstall_script as this information should carry over from version 8. Also it is worth noting that if you recently purchased TeamViewer you should still be able to download TeamViewer 8 Host and use the method described in the article above as your license is attached to your user account and not the host application. You can download the latest version of TeamViewer 9 from their website. Once you have read through this we will start our package for TeamViewer 9. Please read through the previous post of Configuring TeamViewer Host 8 to be deployable with Munki To configure TeamViewer 9 for use in Munki please follow the following: Upon completing this method your systems should then be able to use the password we defined in TeamViewer 8 with TeamViewer 9.
To perform this you will want to always have TeamViewer 8 install FIRST and then use the update_for key in TeamViewer 9 to define that it is an update for TeamViewer 8. When upgrading from TeamViewer 8 to TeamViewer 9 your current password will be converted from the old encryption method to the new encryption method. After many tests I have determined the best way to do this is to upgrade from TeamViewer 8 to TeamViewer 9. If you change the password manually it will work however we would like to use Munki to automate this process. The new key is now PermanentPassword which creates a unique data binary string in the new plist file. After testing and help from Erwin and Robert, it has been determined that TeamViewer 9 now has a new encryption that will prevent our previous method of inserting the password using the defaults write command to insert the password via a data binary for the key SecurityPasswordAES.
TeamViewer has released version 9 and made a few changes which require us to change some of our script in Munki.