I have created a script which starts and stops the domino server. The script is required in the event the server needs to shut down or restart unexpectedly. This script works manually when ran, e.g. ./domino start, ./domino stop. It also starts the domino service fine when the server first starts up.
However, the domino server is not being stopped when the server is shut down or rebooted. The script has been added to run levels 3 and 5 using the chkconfig tool, and all the required start and kill links are in the relevant run level directories.
description: Start up script for Lotus Domino 6.5.2
processname: domino
Usage /etc/init.d domino start|stop
DOM_HOME: This is the variable that tells the script where the Domino data resides
DOM_HOME=/local/notesdata
DOM_USER: This is the variable that tells the script the Linux account used to run Domino 6.5.2 server
DOM_USER=domino6
DOM_PROG: This is the variable that tells the script the location of the Domino executables
DOM_PROG=/opt/lotus/bin
#START: This is executed when you run the command /etc/init.d/domino start
case “$1” in
start)
#Prints a message to the console
echo -n "Starting Domino 6.5.2 Server: "
#When the Domino controller runs a file called .jsc_lock is created
#If Domino is configured to use the controller and the server
#crashes then the .jsc_lock file is not deleted. Therefore when the
#system reboots and tries to start Domino it will fail because of
#the existing .jsc_lock file. Here we ensure that we delete the
#file if it exists before Domino starts
if [ -f $DOM_HOME/.jsc_lock ]; then
rm $DOM_HOME/.jsc_lock
fi
cd $DOM_HOME
#Here we become the notes user and launch the Domino server
su $DOM_USER -c “$DOM_PROG/server &”
OUT=/home/domino6/console_start
IN=/home/domino6/input_start
cat /dev/null > $OUT
cat /dev/null > $IN
su $DOM_USER -c "$DOM_PROG/server <$IN>>$OUT 2>&1 &"
echo -n "Domino Server 6.5.2 Started OK...."
;;
#STOP: This is executed when you run the command /etc/init.d/domino stop
stop)
#Prints a message to the console
echo -n "Stopping Domino 6.5.2 Server: "
cd $DOM_HOME
#Here we switch the user to the Domino user and stop the Domino
#server. We also pipe the Y into the command so we can shut down
#Domino without having to type Y into the terminal
OUT=/home/domino6/console_shutdown
IN=/home/domino6/input_shutdown
#date > $OUT
cat /dev/null > $OUT
cat /dev/null > $IN
echo Y | su $DOM_USER -c "$DOM_PROG/server -q <$IN>>$OUT 2>&1 &"