Skip to main content
Question

Install-reboot-install

  • November 6, 2020
  • 3 replies
  • 4 views

Forum|alt.badge.img+6

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.)

3 replies

sdagley
Forum|alt.badge.img+25
  • Jamf Heroes
  • November 6, 2020

@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


Forum|alt.badge.img+6
  • Author
  • Contributor
  • November 6, 2020

@sdagley That's more or less what I was fearing. Looks like I get to write my first LaunchDaemon!!


sdagley
Forum|alt.badge.img+25
  • Jamf Heroes
  • November 6, 2020

@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.