Managing HP Serviceguard for Linux, Eighth Edition, March 2008

Cluster and Package Maintenance
Configuring a Legacy Package
Chapter 7 281
For more information about services, see the discussion of the
service_ parameters that starts on page 219.
Adding Customer Defined Functions to the Package Control
Script
You can add additional shell commands to the package control script to
be executed whenever the package starts or stops. Enter these
commands in the CUSTOMER DEFINED FUNCTIONS area of the script.
If your package needs to run short-lived processes, such as commands to
initialize or halt a packaged application, you can also run these from the
CUSTOMER DEFINED FUNCTIONS.
You can also use the CUSTOMER DEFINED FUNCTIONS to determine why a
package has shut down; see “Determining Why a Package Has Shut
Down” on page 134.
An example of this portion of the script follows, showing the date and
echo commands logging starts and halts of the package to a file.