Setting up HP SIM 5.x on an HP-UX Serviceguard Cluster (448492-002, February 2008)

42
#
# chkconfig:
-
99 01
# description: St
arts and stops the HPSIM + Hpsmdb backend daemon
# processname: sgsim
# pidfile: /hpsimlnx/var/opt/hpsmdb/data/sgsim.pid
# Source function library.
INITD=/etc/rc.d/init.d
. $INITD/functions
# Get function listing for cross
-
distribution logic.
TYPESET=`ty
peset
-
f|grep "declare"`
NAME=sgsim
# Check that networking is up.
# Pretty much need it for hpsmdb.
[ "${NETWORKING}" = "no" ] && exit 0
# rebuild the ld.so cache in order to include
# the dyn. Libs under /hpsimlnx
# Mandatory to be able to start pg_ct
l
ldconfig 2>&1 > /dev/null
start(){
PSQL_START=$"Starting ${NAME} service: "
/etc/init.d/hpsmdb start
stat=$?
Sleep 2
if [ $stat
-
eq 0 ]; then
/etc/init.d/hpsim start
if [ $?
-
eq 0 ]
; then
success "$NAME"
touch /var/lock/subsys/${NAME}
echo
else
failure "$NAME (hpsim)"
echo
exi
t
-
1
fi
else
failure "$NAME (hpsmdb)"
echo
exit
-
1
fi
}
stop(){
echo
-
n $"Stopping ${NAME} service: "
/etc/init.d/hpsim stop
ret=$?
Sleep 20
res=0
if [ $ret
-
eq 0 ]; then
echo_success
else
echo_failure
res=1
fi
echo
/etc/init.d/hpsmdb stop
ret=$?
Sleep 2