macadmins / outset

Automatically process packages and scripts during boot, login, or on demand.
Apache License 2.0
159 stars 12 forks source link

Update postinstall script to handle upgrades #18

Closed bartreardon closed 1 year ago

bartreardon commented 1 year ago

When running the pkg installer, the postinstall will re-load launchd items. This will re-trigger any boot or login scripts.

To handle upgrades, we should move any scripts out of the way first before any re-launch and then move them back once the agents have been (re)loaded.

Alternate ideas welcome (e.g. creating an "upgrade in progress" token that prevents anything from running)

bartreardon commented 1 year ago

Shouldn't be required for 4.0 -> 4.x upgrades - the SMAppService routines that are called during install will just fall through and launchd bootstrap will similarly just complain that the agents are already loaded.

Will need to create a pre-install though that removes the old launchd plists if installing over the top of an Outset 3 install.

bartreardon commented 1 year ago

pre-install script does this