57 lines
1014 B
Bash
Executable File
57 lines
1014 B
Bash
Executable File
#!/bin/sh
|
|
|
|
function start {
|
|
su ${DOMINO_USR} -c "$DOMINO_BIN -jc -c"
|
|
}
|
|
|
|
function stop {
|
|
su ${DOMINO_USR} -c "echo Y| $DOMINO_BIN -jc -q"
|
|
}
|
|
|
|
# set the domino path and user name under which domino will run
|
|
DOMINO_BIN=/opt/ibm/domino/bin/server
|
|
test -x $DOMINO_BIN || exit 5
|
|
|
|
DOMINO_USR=notes
|
|
|
|
cd /notesdata
|
|
[ -f .init ] && . ./.init
|
|
|
|
case "$1" in
|
|
setup)
|
|
if [ ! -d /data ]; then
|
|
echo "Please start with -v <SRC>:/data, so that your domino data can be initiated" && exit 1
|
|
fi
|
|
|
|
echo "Domino setup is listening on 1352"
|
|
su ${DOMINO_USR} -c "${DOMINO_BIN} -listen 1352"
|
|
|
|
cp -pR /notesdata/* /data/
|
|
echo "Please start domino with -v <SRC>:/notesdata"
|
|
;;
|
|
|
|
start)
|
|
trap 'stop' SIGTERM
|
|
|
|
MAX_OPEN_FILES=`ulimit -n`
|
|
if [ $MAX_OPEN_FILES -lt 60000 ]; then
|
|
echo "setting maximum open files to 60000"
|
|
ulimit -n 60000
|
|
fi
|
|
|
|
echo -n "Starting Domino server"
|
|
start &
|
|
wait
|
|
;;
|
|
|
|
stop)
|
|
echo -n "Shutting down Domino server"
|
|
stop
|
|
;;
|
|
|
|
*)
|
|
echo "Usage: $0 {setup|start|stop}"
|
|
exit 1
|
|
;;
|
|
esac
|