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

1. Usage

Graham Pugh edited this page Nov 10, 2021 · 5 revisions

Note: this script requires AutoPkg and JSSImporter to be installed, and you should use the python3 that is supplied with AutoPkg when running the script. So use /usr/local/autopkg/python to run it.

Run the script and provide the path to a valid pkg recipe you want to use as a parent as an argument:

$ ./JSSRecipeCreator.py ~/Library/Autopkg/RecipeRepos/com.github.autopkg.sheagcraig-recipes/Greenfoot/Greenfoot.pkg.recipe

Starting with version 1.2.0 (python3-compatible):

$ ./jss_recipe_creator.py ~/Library/Autopkg/RecipeRepos/com.github.autopkg.sheagcraig-recipes/Greenfoot/Greenfoot.pkg.recipe

Then follow the prompts. For each prompt, you can type a number to select from a list, enter a new value, or simply hit enter to accept the default value (if there is one). If you don't care about a particular value, like Self Service Icon, just don't provide a value, or leave it out of your recipe template file and it won't get added in (see also the section for creating package-only recipes).

  • Recipe Filename: What you want your recipe's filename to be. It will take the parent recipe's filename and swap pkg for jss by default. Sometimes you may be basing your recipe off of someone else's, so you'll want to change the name to match your organization's naming policy.
  • Recipe Identifier: Defaults to your parent recipe's identifier, with pkg changed to jss. Again, if you're basing off of someone else's recipe. you may want to change this.
  • NAME: The required input to JSSImporter representing your product's name. Used all over the place!
  • Policy Template: The filename of a JSSImporter PolicyTemplate(.xml) file.
  • Package Category: The category to use for your recipe's Package. See Recipe Template section below.
  • Policy Category: The category to use for your recipe's Policy. See Recipe Template section below.
  • Scope: A submenu that walks you through adding values for any groups you want to scope. Scoping groups are only added to the JSSImporter processor arguments. See the Recipe Template section below.
  • Self Service Icon: The filename for an icon file to be used in Self Service. JSSRecipeCreator will default to using the NAME of your product with a '.png' extension. Make sure this file is in your recipe directory before running!
  • Self Service Description: The description used for Self Service policies.

Acute users will notice that there is no prompt for MinimumVersion. JSSRecipeCreator just pulls it from the parent recipe. Usually JSS recipes don't include a lot of other, newer AutoPkg processors or features, so this shouldn't make or break your recipe. It also handles ParentRecipe.

NOTE: All paths have %RECIPE_DIR% prepended to them to make sure everything works correctly.

Clone this wiki locally