https://github.com/scriptingosx/setupmanagerfinishedscript
Daemon + Script to run custom functionality when Setup Manager finishes
https://github.com/scriptingosx/setupmanagerfinishedscript
Last synced: 11 months ago
JSON representation
Daemon + Script to run custom functionality when Setup Manager finishes
- Host: GitHub
- URL: https://github.com/scriptingosx/setupmanagerfinishedscript
- Owner: scriptingosx
- Created: 2024-10-31T16:01:37.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-11T12:25:03.000Z (about 1 year ago)
- Last Synced: 2025-03-11T13:31:30.590Z (about 1 year ago)
- Language: Shell
- Size: 4.88 KB
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Run a script when Setup Manager is finished
This is a launchDaemon that works with [Setup Manager](https://github.com/Jamf-Concepts/Setup-Manager) for Jamf Pro and Jamf School.
See [this blog post for background](https://scriptingosx.com/2025/01/run-a-script-when-setup-manager-is-finished/).
## Usage
Download the repo and adapt the [`setupManagerFinished.sh`](https://github.com/scriptingosx/SetupManagerFinishedScript/blob/main/payload/Library/Management/setupManagerFinished.sh) script to your needs. The code you want to adapt is [in lines 39 through 47](https://github.com/scriptingosx/SetupManagerFinishedScript/blob/d8a837172a6b8b9315480664c1d77749e3499450/payload/Library/Management/setupManagerFinished.sh#L39-L47).
The default script triggers a custom policy trigger (`setup_manager_finished`, defined [in line 10](https://github.com/scriptingosx/SetupManagerFinishedScript/blob/d8a837172a6b8b9315480664c1d77749e3499450/payload/Library/Management/setupManagerFinished.sh#L10))
The [`buildSetupManagerFinishedPkg.sh`](https://github.com/scriptingosx/SetupManagerFinishedScript/blob/d8a837172a6b8b9315480664c1d77749e3499450/buildSetupManagerFinishedPkg.sh) script will assemble the LaunchDaemon plist, the script and the installation scripts into a pkg.
You will have to adapt the name of the certificate you use to sign the pkg [in line 20](https://github.com/scriptingosx/SetupManagerFinishedScript/blob/d8a837172a6b8b9315480664c1d77749e3499450/buildSetupManagerFinishedPkg.sh#L20). If you do not have a signing certificate, you can set `signature=""` and the script will build an un-signed pkg. You need a signed installer pkg when you want to add it to the Jamf Pro Prestage or install it with Jamf School. But if the pkg is not signed, you can still install it with a Jamf Pro policy with a Setup Manager action. As long as it is installed before Setup Manager finishes, it will trigger when the flag file gets created.
## Support and Community
Code is provided as-is. You can join us on the [Mac Admins Slack](https://macadmins.org) in the [#jamf-setup-manager](https://macadmins.slack.com/archives/C078DDLKRDW) channel for discussions.