Additional files and scripts
When you create an agent installation package via Package Builder, you can add files and scripts to the package to give the agent additional capabilities.
Snow-maintained files and scripts
Snow maintains and provides a number of such additional files and scripts, which can be added to the package via Package Builder's Scanning modules section. To add such a scanning module to your package, turn on the toggle for a section in Scanning modules, select Customize, and then select the scanning module that you want to include. For descriptions of all scanning modules available via Package Builder and the availability per platform for each file or script, see Scanning modules.
Custom files and scripts
For some scanning modules, you can include your own custom file or script instead of the default one provided by Snow. To do that, select Include custom for the file or script in the Scanning modules section, and upload your custom one. For information on which files and scripts have this option, see Scanning modules.
You can also add custom files and scripts to your package via the Upload additional files field in the Files section. Here, you can upload, for example, certificate files for Unix agents and custom scan schedules for Linux agents. For some types of scripts, special naming rules apply, see Post-install and pre-uninstall execution of scripts for more information.
-
If Package Builder prevents you from uploading your file or script via the Upload additional files field, it is probably because you are using a file name that is reserved for files and scripts maintained by Snow. Change the name or find the right place to upload the file or script in the Scanning modules section instead.
-
Scanning modules are platform dependent. If a Snow-maintained file or script is not applicable for the platform you selected for your package, Package Builder will allow you to upload it via the Upload additional files field, but it will not affect the agent's behavior.
EXAMPLE
-
If you have created your own Snow Inventory Java Scanner configuration file, you must upload it via the Java section in the Scanning modules section of Package Builder. If you try to upload it via the Upload additional files field instead, you will get an error message, since it is a Snow-maintained file.
-
The Snow Inventory Oracle Scanner configuration file is a Snow-maintained file, but it is only applicable for Linux and Unix platforms. Therefore, when you create a package for the Windows agent, there will be no field available in the Oracle section of the Scanning modules section for including a custom Snow Inventory Oracle Scanner configuration file. If you upload it via the Upload additional files field instead, it will be included in the agent installation package, but it will not affect the behavior of the Windows agent in any way.
Post-install and pre-uninstall execution of scripts
You may want a script to be executed after the agent has been installed, to allow for additional components to be installed. You may also want a script to be executed before the agent is uninstalled, to allow for the additional components to be uninstalled.
For Unix, Linux, and macOS, you can achieve this by using the following naming conventions for the script:
-
Post-install: snow_post_install_*.sh
The script will be executed after the agent has been installed.
-
Pre-uninstall: snow_pre_uninstall_*.sh
The script will be executed before the agent is uninstalled.
For Linux, the pre-uninstall scripts are run by the respective package manager. For macOS and Unix, the pre-uninstall scripts are run when you manually run the uninstall.sh script to uninstall the agent.
Package Builder also supports the following scripts for backward compatibility. However, it is recommended to use the above option when possible.
-
Post-install: snow_custom_postinstall.sh
-
Pre-uninstall: snow_custom_preuninstall.sh
For Windows, you can achieve post-install and pre-uninstall execution of scripts via the use of PowerShell. However, these scripts are run by the agent and not the installer. For more information on the use of PowerShell scripts with the Windows agent, see Running PowerShell scripts as part of the scanning process.