Teamviewer HOST script

Frosty
New Contributor II

Hi I hope you can help, for a long time we have been using a Teamviewer custom branded Host package installer pkg which gets set up after initial enrolment. It goes into a single Teamviewer group and then we change the grouping depending on location in Teamviewer its worked well for us over the years.. 

We have had a company rebrand and so we updated the first install pkg. Now when the new pkg runs and installs the easy access is activated as intended but the check/tick box is still editable by a standard user whereas before it was locked (greyed out) and only editable by admin. Has anyone been able to work out how to disable the option to untick by a standard user please..
This is the current script

 

#!/bin/bash
sudo launchctl load /Library/LaunchDaemons/com.teamviewer.teamviewer_service.plist
sleep8
APITOKEN= Goes here
while true; do
process=$(ps aux | grep TeamViewerHost | grep -v grep | wc -l)
        echo "Process: $process"
if [ $process -gt 2 ]; then
echo "Assigning..."
sleep 17
                /Applications/TeamViewerHost.app/Contents/Helpers/TeamViewer_Assignment -api-token $APITOKEN -alias "$(hostname -s)" -grant-easy-access -reassign
 
    exit $?
else
echo "Waiting for TeamViewer to start..."
sleep 17
fi
done
exit 0

Thanks for any help..

0 REPLIES 0