Managing HP Serviceguard for Linux, Seventh Edition, July 2007

Planning and Documenting an HA Cluster
Package Configuration Planning
Chapter 4 123
The scripts are also run when the package is validated by cmcheckconf
and cmapplyconf.
A package can make use of both kinds of script, and can launch more
than one of each kind; in that case the scripts will be executed in the
order they are listed in the package configuration file (and in the reverse
order when the package shuts down).
A sample script follows. It assumes there is another script called
monitor.sh, which will be configured as a Serviceguard service to
monitor some application. The monitor.sh script (not included here)
uses a parameter PEV_MONITORING_INTERVAL, defined in the package
configuration file, to periodically poll the application it wants to monitor;
for example:
PEV_MONITORING_INTERVAL 60
At validation time, the sample script makes sure the
PEV_MONITORING_INTERVAL and the monitoring service are configured
properly; at start and stop time it prints out the interval to the log file.