Highly Available HP-UX Internet Services (May 2008)
resources) on a different node. The monitor script checks for the availability of a service,
and the startup/stop script starts/stops a service. Relevant scripts are also available to
manually stop and restart packages within the cluster to verify cluster connectivity.
For information on configuring the start and stop scripts, see the HP ServiceGuard
documents at:
http://docs.hp.com/en/ha.html
For sample monitor, startup/stop scripts, see “Appendix A: Sample Scripts for DNS”
(page 19), “Appendix B: Sample Scripts for Sendmail” (page 21), and “Appendix C:
Sample Scripts for FTP” (page 28).
You can use the cmmakepkg command to create the application package configuration
file, and use the cmmakepkg -s command to create the application package control
script. For more information on the cmmakepkg command, see cmmakepkg(1M).
Consider the following points while integrating the startup, stop, and monitor scripts
in an HP ServiceGuard environment:
• Specify the location of the monitor script for a particular service in a package
control script. You can create the package control script by using the cmmakepkg
-s command. The package control script contains the predefined commented
variables that must be modified.
Following are sample entries that you must modify in a package control script:
SERVICE_NAME[0]="DNS_SERVICE" # Name of the service
SERVICE_CMD[0]="/etc/cmcluster/dns/dns.monitor" # Location of monitor script.
SERVICE_RESTART[1]="-r 2" # Will restart the service twice.
• Add the start and stop definitions of a service under the function
customer_defined_run_cmds {} and the function
customer_defined_halt_cmds {} functions, respectively, in the package
control script.
The following describes the definitions specific to BIND, FTP, and Sendmail:
— For BIND, you can define the start and stop definitions directly under the
function customer_defined_run_cmds {} and the function
customer_defined_halt_cmds {} functions. For a sample startup script
for BIND, see “Sample Start Script for DNS” (page 20).
— To invoke the FTP startup/stop script, for example ftp-startup, update the
function customer_defined_run_cmds {} function with the following
entry:
<directory-path>/ftp-startup start
To start/stop the script, update the function
customer_defined_halt_cmds {} with the following entry:
<directory-path>/ftp-startup stop
Configuring the Monitor and Startup/Stop Scripts 7