#!/bin/sh
# description: This will start and stop the Domino Server
# chkconfig: - 99 01

PATH=$PATH:/opt/lotus/notes/latest/linux:/home/notes
LANG="C"
USER="notes"
NOTES_USER="notes"
OUTPUT_LOG=/home/notes/server.log

case "$1" in
'start')
	echo -n "Starting Domino Server"
	su -l - notes -c "/opt/lotus/bin/server > $OUTPUT_LOG &"
	touch /var/lock/subsys/domino
	;;
'stop')
	echo -n "Shutting down Domino Server"
	su -l - notes -c "/home/notes/stop"
	rm -f /var/lock/subsys/domino
	;;
'restart')
	echo -n "Restarting Domino Server"
	su -l - notes -c "/home/notes/restart"
	;;
*)
	echo "Usage: $0 { start | stop | restart}"
	;;
esac
exit 0
