Appendix A. HA scripts 211
ics_restart
#! /usr/bin/sh
# WICS Only Restart Script for HACMP 5.1
# Initialize variables
HOST=`/bin/hostname -s`
PROGID=`echo $0 | sed 's%/usr/bin/%%g'`
APP_WAIT=30
CROSSWORLDS=/opt/IBM/WebSphereICS
export CROSSWORLDS
# Check if ICS is alive
echo "$PROGID - $HOST: Checking if WICS is alive. `date`"
su - cwadmin '-c $CROSSWORLDS/bin/ics_manager -IsServerAlive'
resultvar=$?
if [ ${resultvar} -ne 0 ]
then
# Start WICS
echo "$PROGID - $HOST: Starting ICS. `date`"
su - cwadmin '-c $CROSSWORLDS/bin/ics_manager -start
-c$CROSSWORLDS/config/InterchangeSystem.cfg'
else
echo "$PROGID - $HOST: WICS is alive. `date`"
exit 0
fi

Get Highly Available WebSphere Business Integration Solutions now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.