Skip to content
This repository has been archived by the owner on Feb 8, 2023. It is now read-only.

70 Extras

Xaqtly edited this page Nov 22, 2017 · 5 revisions

Extras

SplashBuddy Ghost Package

Link: SplashBuddy Ghost Package

Description: Script to allow the use of policies that don't have packages in them

TL;DR

  • Do not modify the script itself! Duplicate the script, prefix one with 01 and the other with z02
  • Upload both scripts to your JSS - set 01sb_ghost_pkg.sh to Before, and z02sb_ghost_pkg.sh to After
  • In the JSS, set labels for the $4 and $5 parameters - "Status" and "Package Name", respectively, on both scripts
  • Create your policy, then add both scripts to it
  • In the policy, set the $4 and $5 parameters in both scripts
  • Add the entry to your io.fti.SplashBuddy.plist
  • Use build_pkg.sh to create your SplashBuddy package, upload to your JSS, deploy

Details:

The way SplashBuddy works is that it reads your jamf.log and looks for the package names you specify in your io.fti.SplashBuddy.plist. In order to get SplashBuddy to recognize and display policies that don't have packages in them - like a script or a disk encryption configuration - the same package information needs to be inserted into the jamf.log so SplashBuddy can read it, and that is what this script does.

The script uses Jamf script parameter $4 to identify when the install starts and stops (the orange and green jellies), and script parameter $5 to insert the name of the package into the jamf.log. You don't need to touch the script itself, everything is handled by the script as-is, and the variables are set with the $4 and $5 script parameters.

Once you've set the variables in the $4 and $5 parameters, the script works by first running once with the "Install" and your package name variables and inserts them into the jamf.log so that SplashBuddy reads them and turns on the orange jelly for that package. Then your non-package policy runs, and then the second script runs, with the "Installed" and your package name variables, inserts them into the jamf.log where SplashBuddy reads them, sets the green jelly, then moves onto the next policy.

Instructions:

01: Duplicate the SplashBuddy Ghost Package script so you have two copies of it. Prefix the script names; one of them with "01" and the other one with "z02".

02: Upload both scripts to your JSS. In the Scripts section, under the Options tab, set your 01sb_ghost_pkg.sh to Before, and z02sb_ghost_pkg.sh to After.

03: For each script, under the Options tab, set the Parameter Label for Parameter 4 to "Status", and Parameter 5 to "Package Name".

Parameter Label Before Parameter Label After

04: Create your policy, using the same numbering and naming conventions as the other policies you've set up for SplashBuddy. Set up your payload for whatever it is, (e.g. a disk encryption configuration or a script), and then add both the 01sb_ghost_pkg.sh and z02sb_ghost_pkg.sh scripts to your policy.

05: In your policy, verify that your 01 script is set to Before, and your z02 script is set to After.

  • For your 01 script, set the "Status" (parameter 4) value to Installing, and set the "Package Name" (parameter 5) value to a fake package name that represents what you're doing with this policy. For example, if this is a disk encryption policy, then name your fake package enable_fv-1.0.0.pkg, following the SplashBuddy guidelines for package naming.

Before Parameter Variables

  • For your z02 script, set the "Status" (parameter 4) value to Installed, and set the "Package Name" (parameter 5) value to the same name you created for the first script. Just copy and paste parameter 5 from the 01 script to the z02 script.

After Parameter Variables

Quick recap:

  • Set 01 to Before, set z02 to After
  • Set 01 Status variable to Installing, set z02 Status variable to Installed
  • Set 01 package name to enable_fv-1.0.0.pkg or whatever makes sense for your policy, set z02 package name to the same.

06: Edit your io.fti.SplashBuddy.plist to add another entry. Using the disk encryption example, it should look like this:

<dict>
    <key>canContinue</key>
    <false/>
    <key>description</key>
    <string>Utility</string>
    <key>displayName</key>
    <string>Disk Encryption</string>
    <key>iconRelativePath</key>
    <string>FV2.png</string>
    <key>packageName</key>
    <string>disk_encryption</string>
</dict>

Keep in mind that the fake package name set in the parameter 5 field in your scripts needs to follow the SplashBuddy package guidelines, e.g. name-version.pkg, but your plist entry only needs the name of the package, and nothing else. You just need to make sure that the names match between your plist and your 01 and z02 parameter 5 variables.

07: Use build_pkg.sh to build a new SplashBuddy package, upload to your JSS and deploy as normal.

Once this has all been done, next time you provision a new Mac, you should see your non-package policy listed in SplashBuddy along with all the regular package-based policies, and it should have an orange jelly while installing, and a green jelly when it's finished, just like the others.

Clone this wiki locally