Hey I want to achieve the following. If a certain local user logs in to open a terminal window and show the jamf.log file.
What I have done so far create a policy. with the trigger Login that executes a script that looks the following
#!/bin/bash
# Check if the user is sadmin
if [ $(whoami) = "admin" ]; then
# Open a new Terminal window and run 'tail -f /var/log/jamf.log'
osascript -e 'tell app "Terminal" to do script "tail -f /var/log/jamf.log"'
fi
the policy is executed when user "admin" logs in and gives no errors but there is no terminal window being opened and displays the jamf.log file
I dont know where the error is or why it won't work!? How can I achieve this?