dan-snelson / dialog-scripts

Scripts with leverage Bart Reardon's swiftDialog
MIT License
110 stars 35 forks source link

Wait for Dialog to close before exiting #5

Closed pyther closed 2 years ago

pyther commented 2 years ago

When running the Setup your Mac.bash script from a Jamf policy, the dialog window will automatically close once Jamf is done executing the policy. This does not give the user a chance to review the status and read the final message update.

wait will wait block until all background jobs have completed.

dan-snelson commented 2 years ago

Thanks for the PR, @pyther.

This change would actually impact our workflow as we've trained our users (and TSRs) to expect an automatic reboot after starting the Jamf Pro policy. (We're using Restart Confirm, so the users have 60 seconds to review before reboot.)

What your opinion of using sleep NN instead (and I'll just enter a low value)?

pyther commented 2 years ago

Sleep is tricky because the user can close the dialog before the sleep completes and then you have a period of time when nothing happens. If you set sleep to a low value it may not matter that much but at higher values such as 60 or 120 seconds, it would become a lot more noticeable.

What would you think of adding an argument that would control if the script waited our exited immediately?

dan-snelson commented 2 years ago

Good point.

We've got Parameters 6 through 11 still available; do you want to modify your PR or shall I give it a go? (Not quite sure when that would be.)

dan-snelson commented 2 years ago

@pyther:

Please take a look at 1.2.7 (in the development branch) for a test-drive and let me know if it will meet your needs.

dan-snelson commented 2 years ago

Addressed by 1.2.7.

pyther commented 2 years ago

Sorry for the delay, I've been crazy busy. This looks good to me. Thanks!