Subject: here’s the present stop script
#!/bin/ksh ###############################################################
Domino Application Server Stop Domino Server Script
Licensed Materials - Property of IBM
(C) COPYRIGHT International Business Machines Corp 1994, 1998
All Rights Reserved.
###############################################################
Description - stop_domino
This is the sript to stop the Domino server which has been started
using the corresponding script start_domino.
The script attempts to quit the server gracefully and waits 1 minute.
###############################################################
Set script environment variables
. /home/notes1/scripts/env_domino
Script logic
if ((id -u
== 0))
then
print "Stop the domino server as the $NOTES_USER user "
exit
fi
if [ ! -x /opt/lotus/bin/server ]
then
echo "Cannot access server command - exiting "
exit 1
fi
if [ ! -d $NOTES_PATH ]
then
echo "Cannot access notes data directory - exiting "
exit 1
fi
print “Stopping Domino for AIX ($NOTES_SERVER)”
print " … waiting for shutdown to complete"
echo " quit " >> $INPUT_FILE
count=0
NOTES_RUNNING=“ps -fu $NOTES_USER | grep lotus | grep -v grep
”
while [[ -n $NOTES_RUNNING ]] ; do
sleep 10
count=expr $count + 1
echo " … waiting “$count"0 seconds”
Terminate if Domino server is still running
if [ $count -eq 6 ] ; then
echo “Domino Server is still running after 1 minute”
echo " … now for the ungraceful method"
for i in ps -fu $NOTES_USER | grep lotus | grep -v grep | awk ' {print $2 }'
; do
kill -9 $i
done
mems=ipcs | grep $NOTES_USER | awk '{ print $1 $2 }' | awk -F'm' '{ print $2 }' | awk '{ print $1 }'
sems=ipcs | grep $NOTES_USER | awk '{ print $1 $2 }' | awk -F's' '{ print $2 }' | awk '{ print $1 }'
for j in $mems;do if [ -n “$j” ] ; then ipcrm -m $j;fi;done
for j in $sems;do if [ -n “$j” ] ; then ipcrm -s $j;fi;done
echo “Domino server ($NOTES_SERVER) Terminated!”
exit
fi
NOTES_RUNNING=“ps -fu $NOTES_USER | grep lotus | grep -v grep
”
done
echo “Domino for AIX ($NOTES_SERVER) shutdown completed.”