Posted on 08-31-2016 08:02 AM
Is there any way to log the results of a login script that is run by a Launch Agent the same way it would be logged if it were deployed as a Login Hook by Casper? I initially set this script up as a Login Hook but the script was only running at login about half the time. As a Launch Agent it runs consistently every time. I know I could have the script create a log elsewhere but I would really like to utilize the powerful logging features of Casper.
Posted on 08-31-2016 09:42 AM
powerful logging features of Casper
First time I've heard that...
But still, only a JSS policy will log in the JSS. If I needed to accomplish that, I would have my LaunchAgent log to a file, perhaps in /tmp, and then read it in with an EA.
Posted on 08-31-2016 10:03 AM
If I needed to accomplish that, I would have my LaunchAgent log to a file, perhaps in /tmp, and then read it in with an EA.
I think that's about the only way one could do this. You can't tie into a policy's logging functions without actually doing it through a policy. At least not that I'm aware of.
Posted on 08-31-2016 11:02 AM
I suppose you could have the launchagent log to /tmp/file then have a policy with 'Files and Processes' -> Execute command -> cat /tmp/file At least then you could get to it via policy logs.
Posted on 08-31-2016 11:46 AM
Hmm, good point. I suppose a policy that scrapes a log and echoes the results would end up putting those contents into the regular policy log. Still, that is, once again, doing it 'through a policy'.
Posted on 08-31-2016 12:45 PM
powerful logging features of Casper First time I've heard that...
The word I was thinking of was convenient. I would like to be able to see all of my scripts/policies in one place and be able to quickly verify that they are running as expected. If someone else looks through Casper to see what's running, they'd have no idea that some computers have login scripts because they're done outside of Casper. Has anyone submitted a feature request to utilize Launch Agents instead of Login Hooks for the built in login trigger?