#!/bin/ksh
NOTES_USER=notes
NOTES_PATH=/local/notesdata
PATH=$NOTES_PATH:/pot/lotus/bin:$HOME/bin:$PATH
count=0
NOTES_RUNNING=`ps -fu $NOTES_USER | grep /opt/lotus | grep -v grep | grep
-v bash`
while [[ -n $NOTES_RUNNING ]] ; do
sleep 10
count=`expr $count + 1`
echo "... waiting "$count"0 seconds"
if [ $count -eq 1 ] ; then
echo "Domino server is still running after 2 minutes"
echo "Now ... he will dead"
for i in `ps -fu $NOTES_USER |grep lotus|grep -v grep |\
awk '{ print $2 }'`; do
kill -9 $i
done
mems=`ipcs -m | grep $NOTES_USER | awk '{ print $2 }'`
sems=`ipcs -s | grep $NOTES_USER | awk '{ print $2 }'`
for j in $mems; do if [ -n "$j" ];then ipcrm shm $j>tmp.lck;fi; done
for j in $sems; do if [ -n "$j" ];then ipcrm sem $j>tmp.lck;fi; done
rm -f tmp.lck
exit
fi
NOTES_RUNNING=`ps -fu $NOTES_USER | grep /opt/lotus | grep -v grep `
done
rm -f $NOTES_PATH/~notes.lck
echo Domino shutdown now completed
Source IBM Redbook SG246007.pdf
previous page
|