mm2270 / JamfProScripts

A collection of shell scripts created for use in Jamf Pro and elsewhere
MIT License
174 stars 30 forks source link

Instant Reboot #3

Closed jhbush closed 8 years ago

jhbush commented 9 years ago

selectable_SoftwareUpdate.sh I'm wondering how difficult it would be to add a reboot option rather than waiting for the 5 minute progress bar to complete? I hate to remove the progress, but a reboot now would be a nice option to have.

mm2270 commented 9 years ago

Hi Jason! Can you provide a little more info on what you'd like to see exactly? So, after any installations occur that require a reboot, just have the Mac reboot immediately instead of doing the reverse progress bar countdown? Is that kind of what you'd like? If so, that shouldn't be hard to do. Its actually more work to do a countdown with progress than a shutdown -r now command. I would of course like to make it an optional setting in the script though. Something that can either just be hardcoded to do that, or a script parameter passed to it to "flip" it on or off for example.

jhbush commented 9 years ago

Mike, sorry I didn’t point out which script I was referring to in the initial post. It's selectable_SoftwareUpdate.sh It looks like you could add it in the doneRestart function as an additional click box. This script is awesome by the way thanks for putting it out there. Lots of great examples to draw from for CD based tools.

mm2270 commented 9 years ago

Jason, actually you did mention which script it was, so no worries there. I just wanted to make sure I understood what you were looking for. If I understand correctly, you would like an option that the user can click to just reboot the Mac instead of waiting for the 5 minute countdown to finish. That should be easy enough to add. I'm glad you're able to make use of the script! I will see about adding in an option for immediate reboot, or a flag that will enable that so its optional to anyone who uses the script.

mm2270 commented 8 years ago

Hi Jason, this took me nearly a year to get to, but I finally updated the selectable_SoftwareUpdate.sh script to include a "Reboot Now" button, which does exactly as described. When this button is clicked in the final dialog, it skips the countdown, waits 4 seconds, then does an immediate reboot. Clicking the "OK" button will do the normal countdown to reboot.

I'm closing this issue since this functionality should satisfy what you were looking for. Feel free to open it again if you find any issues with it, or it doesn't fit your needs.

jhbush commented 8 years ago

Mike, thank you for adding this to your original script. It's very useful. I guess shouldn't press my luck by asking for a built in defer option.