Last active
February 11, 2020 17:57
-
-
Save apizz/bc382cb1ba8f84505db8886273421e38 to your computer and use it in GitHub Desktop.
Writes the supplied TeamViewer Host configuration ID to the TeamViewer Host app. For use with munki.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| ATTR="com.TeamViewer.ConfigurationId" | |
| CONFIG_ID="<your_custom_config_id>" | |
| TVHOST="/Applications/TeamViewerHost.app" | |
| STATUS=$(/usr/bin/xattr -l "$TVHOST") | |
| # If no extended attribute present, write it | |
| if [ "$STATUS" = "" ]; then | |
| /bin/echo "Writing TeamViewer Host configuration ID ..." | |
| /usr/bin/xattr -w "$ATTR" "$CONFIG_ID" "$TVHOST" | |
| else | |
| /bin/echo "TeamViewer Host configuration ID already present." | |
| fi | |
| exit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Looks like TeamViewer have changed the extended attribute to "com.TeamViewer.ConfigurationId" at some point - I'm seeing this on the latest TeamViewer Host app (15.2.2756)