-
Notifications
You must be signed in to change notification settings - Fork 63
Nessus Agent recipe w/ postinstall script #262
Conversation
The recipe looks good.
However you might want to consider what happens if the pkg file doesn't install correctly. Do you still want the script to run? In its current state, the script would produce this output upon failed installation:
That could be misleading, so you might want to check for the existence of the |
@homebysix Good idea. I added a quick installation check to the top of the script that exits if Nessus doesn't exist on the machine. |
Thanks! |
@homebysix Now that I'm trying to run this thing from an override, I'm hitting a bit of a wall. The user needs to pass values into the script for KEY, HOST, and PORT to make the policy work properly. I can make the script use JAMF parameters but I'm not sure how to pass values to those parameters at the recipe level. Obviously they could just run a copy of the script from their RecipeOverrides folder but it's not clear that needs to happen since the script file isn't included in the override. What's the recommended way to accomplish this? |
Hi @skoobasteeve - That's a good callout. At this time, you'd need to make a copy of the Nessus Agent.jss.recipe (with a different identifier) and have it refer to a customized copy of the Nessus Agent PostInstall.sh script (with a different filename). Then you'd create an override of your new recipe (again, with a different filename). It would be easier to handle customization like this if the script |
Thanks @homebysix, I've been getting familiar with JamfUploader this morning and it seems like great project. The example recipes are really straightforward. Are the JamfUploader recipes being uploaded within the same repos or will there be a unified repo like jss-recipes? |
Many JamfUploader recipes are in this repo: https://github.com/autopkg/grahampugh-recipes/tree/main/Jamf_Recipes |
I created this recipe to go along with my download recipe. It adds a script to the policy in JAMF that enrolls the system with your company's Nessus tenant immediately after install. It requires the user to fill in the first three variables in the script.
This is my first time writing a recipe with a script so let me know if there's anything I missed.
Thank you!