Skip to content

Instantly share code, notes, and snippets.

@apizz
Last active February 11, 2020 17:57
Show Gist options
  • Select an option

  • Save apizz/bc382cb1ba8f84505db8886273421e38 to your computer and use it in GitHub Desktop.

Select an option

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.
#!/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
@mikethehill

Copy link
Copy Markdown

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)

@apizz

apizz commented Feb 11, 2020

Copy link
Copy Markdown
Author

@mikethehill pretty darn sure I just made a typo 🤦‍♂️ . Should be better now :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment