Highly Available HP-UX Internet Services (May 2008)
else
echo "ERROR: /etc/rc.config defaults file MISSING"
fi
if [ -x /usr/sbin/named ]; then
/usr/sbin/named $NAMED_ARGS && echo "named \c"
if [ $? -ne 0 ]; then
echo "Error in starting named. Recommend checking the"
echo "syslog file (usually /var/adm/syslog/syslog.log)"
echo "for possible reasons."
fi
else
echo "/usr/sbin/named is not executable"
fi
test_return 51
}
Sample Stop Script for DNS
Following is a sample stop script for DNS in an HP ServiceGuard environment:
function customer_defined_halt_cmds
{
# ADD customer defined halt commands.
: # do nothing instruction, because a function must contain some command.
print "$(date '+%b %e %X') - Node \"$(hostname)\": Halting the named daemon\n"
if [ -r /var/run/named.pid ]
then
PID=`cat /var/run/named.pid`
else
PID=$(ps -e |
while read _PID _TTY _TIME _CMD
do
[[ "$_CMD" = "named" ]] && echo $_PID
done)
fi
if [ "$PID" = "" ]
then
echo No name server is running. >&2
else
if kill $PID
then
echo Successfully halted the named daemon.
fi
fi
test_return 52
}
Appendix B: Sample Scripts for Sendmail
This section discusses the sample monitor, start, and stop scripts for Sendmail in an
HP ServiceGuard environment.
This section addresses the following topics:
• “HP ServiceGuard Monitor Script for Sendmail” (page 22)
• “HP ServiceGuard Startup/Stop Script for Sendmail” (page 23)
Appendix B: Sample Scripts for Sendmail 21