Posted on 11-06-2020 09:34 AM
Is there a known good way to create a policy that includes a reboot in the middle of the process?
Situation: a piece of software cannot be cleanly updated, but must be uninstalled, the machine restarted, and only then have the new version installed. I want to make this a one-touch experience for my users if possible.
I've seen some things on some Linux sites that I might leverage but I'm hoping there's a wheel already invented. (And yes we are FileVault enabled so authenticated restart will be that middle step.)
Posted on 11-06-2020 11:21 AM
@PhilS You can't do it with one policy, but you could have a phase 1 policy that does the removal and install a LaunchDaemon that is essentially a jamf policy -event Phase2Policy
call before restarting. Then have a cleanup script in the Phase2Policy that removes the LaunchDaemon
Posted on 11-06-2020 11:36 AM
@sdagley That's more or less what I was fearing. Looks like I get to write my first LaunchDaemon!!
Posted on 11-06-2020 11:52 AM
@PhilS If you want some ideas take a look at https://github.com/kc9wwh/macOSUpgrade/blob/master/macOSUpgrade.sh which installs a LaunchDaemon to run a cleanup script after an OS upgrade.