sheagcraig / yo

Send Notification Center messages from the command line
Apache License 2.0
384 stars 44 forks source link

yo_sheduler not working as root user #50

Open vandehey opened 4 years ago

vandehey commented 4 years ago

I'm trying to use yo_scheduler via JAMF. When I'm on a system, I can run yo_scheduler as the logged in user and I get my notification. I cannot run the scheduler as root via CLI (so it shows up for the logged in user). Scripts in JAMF run as root, so that explains why my policy is failing as well. Is there anything else that I need to do to make the scheduler work, when running this as root?

sheagcraig commented 3 years ago

Hi @vandehey. This has always worked for me from Munki, also running as root. Let me investigate. Let me know if you can give me any further details.

vandehey commented 3 years ago

Thanks @sheagcraig . It's hard to say exactly what I was doing in March when I posted this. But I just looked in JAMF, and it looks like I set my policy to cat a script into place, chmod it, then run the script. So a sort of a script within a script is what it looks like on my end.