# Get port number from infocenter.properties:
port=`grep -E ^wrapper.app.parameter.6 /opt/${param2}-infocenter/infocenter.properties | awk -F"=" '{print $2}'`
# Get PID for process running on the port:
PID1=`pgrep -u root -f $port`
# Check status ($?) of the pgrep; "0" means there was a match, so get parent PIDs and kill the main parent:
if [ $? -eq 0 ]
then
# Get PID for parent (the java process) of $PID1:
PID2=`ps -o ppid= -p $PID1`
# Get PID for parent (the wrapper) of $PID2:
PID3=`ps -o ppid= -p $PID2`
kill -9 $PID3
# Sleep to make sure process is completely dead and the new IC can start cleanly:
sleep 40
fi
Please ignore this message if you are not interested in the ${param2} infocenter.
The ${param2} infocenter was unavailable for over 15 minutes and was automatically restarted.
If you need to prevent automatic restarts of this infocenter, contact
mpd-techpubs-buildmgr@list.nokia.com.
Doctools staff: The sphere.motive.com:/opt/auto-restart-infocenters-build.xml ant file does these checks.
${timestamp}