Here is a script you can invoke from /etc/init.d, /etc/rc3.d, or /etc/rc0.d:
#!/bin/sh # # agpeu * 09.04.97 * 25.07.97 # state=$1 serverdir=${serverdir:-/data/lotus/server45} clientdir=${clientdir:-/data/lotus/client45} logdir=${logdir:-/data/lotus/log} logfile=${logfile:-${logdir}/`date +%y%m%d`.log} logfile=${logfile:-/dev/null} domlog=${domlog:-${logdir}/domino.log} serverlock=${serverdir}/server.lock LOTUSDIR=${LOTUSDIR:-/vol/lotus/domino45} export LOTUSDIR PATH=.:/data/lotus/server45:/vol/lotus/domino45/bin:/usr/bin:/usr/openwin/bin:/usr/dt/bin:/vol/gnu/bin export PATH case $state in 'debug') # Zur Anzeige der aktuellen Variablen echo serverdir $serverdir echo clientdir $clientdir echo logdir $logdir echo logfile $logfile echo PAHT $PATH echo LOTUSDIR $LOTUSDIR ;; 'watch') # bringt den aktuellen LOG auf den Bildschirm if [ -f $logfile ] ; then echo Logfile $logfile tail -f $logfile else echo Logfile $logfile ist keine Datei fi ;; 'console') # Starten des Notes-Clients als Server-Console im SERVER directory cd $serverdir echo Server Console starten `date +%y%m%d-%H%M%S` >> $logfile notes & ;; 'start') # Starten des Notes Servers cd $serverdir if [ -f $serverlock ] then echo Notes Server already running else touch $serverlock echo "Notes Server start " `date +%y%m%d-%H%M%S` >> $logfile server start >> $logfile & echo "Notes Server start " `date +%y%m%d-%H%M%S` >> $domlog fi ;; 'stop') # Runterfahren des Notes Servers cd $serverdir if [ -f $serverlock ] then echo Notes Server stop `date +%y%m%d-%H%M%S` >> $logfile server -q >> $logfile if [ -f *.TMP ] ; then rm *.TMP ; fi echo Notes Server stoped `date +%y%m%d-%H%M%S` >> $logfile echo Notes Server stoped `date +%y%m%d-%H%M%S` >> $domlog rm $serverlock else echo Notes Server not running fi ;; 'client') # Starten des Notes-Clients im CLIENT directory cd $clientdir if [ -w ./notes.ini] then notes & else echo "Notes Client nicht installiert" fi ;; 'kill') # kill -9 aller Notes Server Prozesse # Suchen und Sichern eines Core-Files if [ -f $serverlock ] ; then rm $serverlock ; fi ps=`ps -ef -o pid -o ppid -o stime -o args | grep /vol/lotus/domino | grep -v grep ` if [ -n "$ps" ] ; then echo "$ps" echo Notes Server KILL `date +%y%m%d-%H%M%S` >> $logfile echo "$ps" >> $logfile # echo Directory >> $logfile # find $serverdir -name "*.n?f" -exec ls -l {} \; >> $logfile # echo [END] >> $logfile if [ -f $serverdir/core ] ; then mv $serverdir/core $logdir/core.`date +%y%m%d-%H%M%S` fi echo kill -9 `ps -ef -o pid -o args | grep /vol/lotus/domino | cut -c1-6 ` kill -9 `ps -ef -o pid -o args | grep /vol/lotus/domino | cut -c1-6 ` echo Notes Server killed `date +%y%m%d-%H%M%S` >> $domlog fi ;; 'check') # Suchen und Sichern eines Core-Files # Liste aller Prozesse # Liste aller Datenbanken und -schablonen if [ -f $serverlock ] then echo Notes Server running else echo Notes Server NOT running fi if [ -f $serverdir/core ] then echo "## core dump" ls -l $serverdir/core mv $serverdir/core $logdir/core.`date +%y%m%d-%H%M%S` else echo "## no core found" fi echo "## " echo "## Processes" ps -ef -o pid -o ppid -o stime -o args | grep /vol/lotus/domino | grep -v grep echo "## " echo "## Databasefiles and -templates" find $serverdir -name "*.n?f" -exec ls -lL {} \; echo "## " ;; 'clean') # Loeschen der Log- und Corefiles die aelter als 7 Tage sind. find $logdir -type f -mtime +7 -exec rm {} \; ;; ) echo `basename $0` "[start | stop | kill | check | client | debug ]" ;; esac