Has anyone deployed the Junos Pulse Installer through JAMF? It's a simple installer package, but we can't get it to work without requiring the user to reboot? We have to do a load of a LaunchAgent in the users context. The funny thing is, the script works fine when we manually run a trigger to install it, but if the same script is ran on the every15 trigger, it requires the user to reboot for it work properly. I am not sure why that is. Here is the specific segment of code. Any ideas as to why this doesn't work properly when ran on the every15 trigger vs working properly when ran with a manual trigger?
####### This part gets the current user and loads the launch agent as the current user.
#
currentUser=stat -f%Su /dev/console
#
######
userPID=ps -ef | grep "loginwindow console" | grep -v grep | awk '{print $2}'
launchctl bsexec $userPID su $currentUser -c 'launchctl load -F /Library/LaunchAgents/net.juniper.pulsetray.plist'
