Customization package specifications - Adaptive Applications - BlueCat Gateway - 22.1

BlueCat Server Update Services Administration Guide

Locale
English (United States)
Product name
BlueCat Gateway
Version
22.1
Warning: This feature is intended for advanced users only. BSUS does not test, validate, or otherwise evaluate the contents of a customization package in any way. The contents and actions of the bash script in a customization package are entirely the responsibility of the customer.
Customization packages let you preserve and restore customizations specific to a system that might get lost or overwritten during an update. A customization package is a ZIP file that contains the following:
  • A bash script named customize.sh in the root of the ZIP archive. This file must satisfy the requirements listed below.
  • Support files needed by the script. Common support files include .crt and .key files for certificates, but you can include any file types you want. Support files can be organized into subfolders within the ZIP archive if desired.

Customization package installation folder

When a customization package is uploaded to a target DNS server, its contents are extracted to the following directory:

/home/bluecat/preserved_scripts/customizations/

Commands and actions in the script must assume that it can be run from that folder.

Tip: If the customize.sh script needs to copy or store data files as part of a backup or restore operation, you can store them within this folder.

Customization package calls and return values

BSUS will call customize.ph before and after the upgrade, with the following parameters.

Parameter Description
-b

Called by BSUS just before an update is applied, if preliminary checks passed (customize.sh -b).

Expected actions: When the -b parameter is used, the customization script should execute "backup" actions that back up needed settings and configurations.

If backup actions need to create additional backup data files, they can be safely stored in the customizations folder on the server.

Return value: If successful, the script should return 0. If the backup operation was unsuccessful, the script should return a non-zero value.

If the an unsuccessful (non-zero) result is returned for any server in a Server Batch, BSUS will abort the update operation for that Batch and report the returned value in its event log.

Tip: If no backup actions are needed, you can simply have the script return 0 when -b is used.
-r

Called by BSUS just after an update is applied, if the update was successful (customize.sh -r).

Expected actions: When the -r parameter is used, the customization script should execute "restore" operations that set the desired settings and configurations on the server.

Return value: If successful, the script should return 0. If the restore operation was unsuccessful, the script should return a non-zero value; BSUS will report the returned value in its event log.