Skip to content

Step 5 LaunchDaemon

Joe Workman edited this page Jan 16, 2020 · 6 revisions

Create the LaunchDaemon

In order to ensure the JumpCloud user account is configured during this workflow, a LaunchDaemon is installed. This launchdaemon ensures the execution of the jumpcloud_bootstrap_template.sh script. For additional information, Apple's documentation archive is a expansive resource for building and designing daemons. This workflow runs a daemon to run the jumpcloud_bootstrap_template.sh script on startup.

  1. Create a .plist file or copy the provided com.jumpcloud.prestage.plist daemon file.

  2. Ensure the Label Key and string aligns with the variable name set in the jumpcloud_bootstrap_template.sh file. The .plist file will be loaded as a LaunchDaemon at the end of the postinstall script created in the next step.

    • The provided com.jumpcloud.prestage.plist daemon is set to run at system load. The dameon will start the jumpcloud_bootstrap_template.sh script every 10 seconds if the script exits early.
    • If a system is rebooted during enrollment, the daemon should enforce this workflow where it left off.
  3. Check that the .plist is formatted correctly using the below command:

plutil -convert xml1 ExampleBinary.plist

Running this command and receiving no return code validates that the plist file is formatted correctly.

Example:

bash-3.2$ ls
com.jumpcloud.prestage.plist	jumpcloud_bootstrap_template.sh
bash-3.2$ plutil -convert xml1 com.jumpcloud.prestage.plist
bash-3.2$

Optionally, include reporting keys for additional debugging:

<key>StandardErrorPath</key>
<string>/var/tmp/com.jumpcloud.prestage.err</string>
<key>StandardOutPath</key>
<string>/var/tmp/com.jumpcloud.prestage.out</string>