Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

help with jamf policy -event #25

Closed
CC007W opened this issue Dec 22, 2022 · 12 comments
Closed

help with jamf policy -event #25

CC007W opened this issue Dec 22, 2022 · 12 comments
Assignees
Labels
waiting info On-hold, waiting information from requestor

Comments

@CC007W
Copy link

CC007W commented Dec 22, 2022

Hello, First thank you for this. We are in the testing/pilot stages of mac rollout. I have been testing the script however, I have run into so troubles with using the custom event triggers.

Im editing this line:

{
           "listitem": "Software",
           "icon": "99",
           "progresstext": "Please wait",
           "trigger_list": [
               {
                   "trigger": "working",
                   "path": "/Applications/Software/Test.app/Contents/Info.plist"
               }
           ]
       }

When I run Setup Your Mac from Self Service it fails instantly.
2022-12-22 09:00:00 - SETUP YOUR MAC DIALOG: listitem: index: 0, status: fail, statustext: Failed

However on the same macbook from Terminal. This works fine and installs the package
sudo /usr/local/bin/jamf policy -event working

Is there something obvious I'm missing here?

@dan-snelson
Copy link
Owner

Thanks for reaching out, @CC007W, and sorry to hear that your mileage is varying too greatly.

Please confirm that policy_array is valid JSON; see the last bullet of Step E.2.3.2.

@dan-snelson dan-snelson self-assigned this Dec 22, 2022
@dan-snelson dan-snelson added the waiting info On-hold, waiting information from requestor label Dec 22, 2022
@dan-snelson
Copy link
Owner

(You're also invited to join us on the #setup-your-mac Mac Admins Slack Channel.)

@CC007W
Copy link
Author

CC007W commented Dec 22, 2022

Hello, Yes I did test everything in policy array and came back as Valid JSON

@dan-snelson
Copy link
Owner

Thanks for validating.

I’m Terminal, when you run …
sudo /usr/local/bin/jamf policy -event working

… does it actually install:
"/Applications/Software/Test.app/Contents/Info.plist"

If not, that’s what’s “failing.”

@CC007W
Copy link
Author

CC007W commented Dec 22, 2022

Thanks for validating.

I’m Terminal, when you run … sudo /usr/local/bin/jamf policy -event working

… does it actually install: "/Applications/Software/Test.app/Contents/Info.plist"

If not, that’s what’s “failing.”

Yes once I run in Terminal that path is now there because I tried Setup your Mac after using terminal and I get an instant Installed message

@dan-snelson
Copy link
Owner

Interesting …

… is it a timing issue on the first execution?

(Setup Your Mac isn’t doing anything special to see if the file exists.)

@dan-snelson
Copy link
Owner

You may wish to try 1.6.0-rc9 with a validation of None.

@dan-snelson
Copy link
Owner

Greetings, @CC007W!

Please advise the current status.

Thanks.

@CC007W
Copy link
Author

CC007W commented Dec 27, 2022

Hello,
I tried using 1.6.0 with validation of None . The status immediately shows installed however, the package is never installed. I also tried moving down in order with no luck. Its as if jamf policy -event never kicks off

@dan-snelson
Copy link
Owner

Thanks for the update, @CC007W.

Will you please direct-message me the logs on the Mac Admins Slack?

@dan-snelson
Copy link
Owner

Closing-the-loop for any other affected admins:

  • Enhanced policy logging options
    • Search for and comment-out: eval "${jamfBinary} policy -trigger ${trigger}"
    • Uncomment: eval "${jamfBinary} policy -trigger ${trigger} -verbose | tee -a ${scriptLog}"
    • Ensure debug mode is set to false

@CC007W
Copy link
Author

CC007W commented Dec 27, 2022

This solved my issue.
Ensure debug mode is set to false (since policies do not actually execute when debug mode is set to true)

@CC007W CC007W closed this as completed Dec 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting info On-hold, waiting information from requestor
Projects
None yet
Development

No branches or pull requests

2 participants