jamf / DEPNotify-Starter

Bash script to start DEPNotify and run policies during enrollment with Jamf Pro
https://gitlab.com/Mactroll/DEPNotify
MIT License
367 stars 86 forks source link

DEPNotify not starting until Self Service is manually Opened #20

Open lozbraz opened 5 years ago

lozbraz commented 5 years ago

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior: I have NoMAD Login configured in the Prestage enrollment, and DEPnotify triggered by enrollment complete. After initial setup and logging in with a user account with ¬NoMAD login, the DEPNotify GUI does not start- however If I manually start the Self Service, it kicks in and runs as expected.

Expected behavior I expect the DEPNotify GUI to run as soon as the User is logged in

Logs Please attach the following logs: depnotify.log depnotifyDebug.log

Software Versions (please complete the following information):

]

Additional context It looks like Self Service is not starting because JAMF can't find the logged in user- is this necessary to start the DEPNotify GUI?

Here is the DEP Notify Script I am using-

dep-notify-script.txt

Thanks in advance!

lozbraz commented 5 years ago

An update on this- it looks like DEPNotify is hanging on-

"waiting for branding image from JAMF pro" over and over, however if I open Self Service it seems to pick up the branding and DEPNotify kicks in. I'm not sure why it is unable to pick up the branding until it is opened though?

Thanks!

arekdreyer commented 5 years ago

The comments in the script say: "custom branding is downloaded from Jamf Pro after Self Service has opened at least one time. The script is designed to wait until the files have been downloaded." I am guessing that you need to open Settings > Global Management > User-Initiated Enrollment > Platforms > macOS and enable "Launch Self Service when done" so that Self Service opens to download the branding.

lozbraz commented 5 years ago

Thanks arekdreyer- sorry I should have seen that in the script. Self Service is set to open automatically, however from the jamf logs I am getting-"Unable to launch Self Service. Unable to determine the logged in user." It looks like the DEPNotify script has run before JAMF has notified the JSS about the logged in user. This is obviously a timing issue- can teh @enrolment DEPNotify script be delayed, or do I need a launchDaemon? I really appreciate your advice on this...

arekdreyer commented 5 years ago

How are you running the DEPNotify starter script?

lozbraz commented 5 years ago

I have a policy that is triggered by enrolment complete. It installs DEPNotify then runs the starter script

arekdreyer commented 5 years ago

Sorry, you said that in the original post, "and DEPnotify triggered by enrollment complete." I don't know why "Unable to determine the logged in user" is happening!

lozbraz commented 5 years ago

Interesting- I set the custom branding to false, and it is now working as expected! I still need to find a way to get the company logo in though...

kbareis commented 5 years ago

Hey @lozbraz, are you changing the name of Self Service.app to something different? I see in the debug log that the script didn't find the Self Service process ID which leads me to believe that you have changed the name of the app.

master-vodawagner commented 3 years ago

Hi all,

Just to chip in here but I get the exact same behaviour.

macOS Big Sur 11.1 DEPNotify 1.1.6

Inside the depnotifyDebug,log it is constantly being spammed by the below

Waiting for branding image from Jamf Pro

Thing is the Self Service app (Named differently) has opened and the icon image has changed