Domino su RedHat 7.2
Massimo Masson
blug@lists.linux.it
Wed, 27 Feb 2002 19:04:56 +0100
Ho finalmente terminato l'installazione di Domino su RedHat 7.2. C'č stato
qualche problema ma lo ho finalmente risolto (versioning + JVM).
Approfitto della ML per chiedere un consiglio su un errore che non riesco al
momento ad individuare. Avviando da terminale, tutto ok. Per far partire il
servizio al boot mi son preparato uno script (e tutte le cose che servono,
ln -s ai files di startup e cosė via.) per avviare e fermare il servizio,
al solito dando /etc/rc.d/init.d/domino {start|stop}. Ma lo script mi da il
seguente errore (avviando "a mano" come root):
[root@fermat init.d]# cd
[root@fermat root]# /etc/rc.d/init.d/domino
/etc/rc.d/init.d/domino: line 96: unexpected EOF while looking for matching
`"'
/etc/rc.d/init.d/domino: line 103: syntax error: unexpected end of file
[root@fermat root]#
Premesso che al momento non so come digitare l'apice inverso (non lo ho
sulla tastiera... :( ) gli errori sono sulle ultime righe (l'ultimo echo
dello script)
Qualche anima buona sa darmi delle indicazioni per risolvere il problema?
TIA, Max.
Allego lo script (lo user non č cambridge, ma non importa, io ho quello
giusto)
p.s. mi viene in mente ora... lo script l'ho uploadato via secure-ftp da
win... che c'entri qualcosa?
#!/bin/sh
#
# domino Start/stop The Lotus Domino server
#
# chkconfig: 345 95 95
# description: This script is used to start the domino \
# server as a background process. It will send\
# the serverID password from a file to the \
# server. Communication with the server \
# has to be done through cconsole, Notes \
# Administrator or webadmin.\
#
# Usage /etc/rc.d/init.d/domino start|stop
#
# process name: server,...
# Change the USER, GROUP, DATA_DIR and BIN_DIR for your server
DOMINO_USER="cambridge" # Domino User
DOMINO_GROUP="cambridge" # Domino User Group
DOMINO_DATA_DIR="/local/notesdata" # Location of notes.ini
DOMINO_BIN_DIR="/opt/lotus/bin" # Location of binaries
# We need a file to put the serverID password in.
# Make sure owner is the Domino owner and the file
# permission is set to 400.
SERVER_PASSWD_FILE="/local/notesdata/.domino.pwd"
# Look if the user that runs this script is root
# These next lines may be removed if you want to run this as a normal
script, rather than run as root at boot time
if [ `id -u` != 0 ]; then
echo "This script must be run by root only"
exit 1;
fi
# See how we are called.
case "$1" in
start)
# First check if the password file exists,
# if not exit with errorcode
# [ -f file ] : true if file exists and is
# regular file
# ! expr : true is expr is false
if [ ! -f $SERVER_PASSWD_FILE ]; then
echo "Error: No password file."
exit 1
fi
# Set permission to 400 (read-only-owner)
# and ownership to $DOMINO_USER. These next lines are
# not necessary if the ownership was set correctly the
# first time.
chmod 400 $SERVER_PASSWD_FILE
chown $DOMINO_USER.$DOMINO_GROUP $SERVER_PASSWD_FILE
# Two ways to run the server (comment one of
# them out):
# 1. With the output of the console redirected
# to the log file /var/log/domin.log. Be sure
# to change the logrotate daemon
# 2. With output of the console redirected
# to /dev/null
echo -n "Starting domino server..."
# Version with logfile (selected by default)
su - ${DOMINO_USER} -c "cd ${DOMINO_DATA_DIR};\
cat ${SERVER_PASSWD_FILE} |\
${DOMINO_BIN_DIR}/server" >\
/var/log/domino.log 2>&1 &
# Version without logfile
# su - ${DOMINO_USER} -c "cd ${DOMINO_DATA_DIR};\
cat ${SERVER_PASSWD_FILE} |\
${DOMINO_BIN_DIR}/server" >\
/dev/null 2>&1 &
echo "done."
;;
stop)
echo -n "Stopping Domino server: "
su - ${DOMINO_USER} -c "cd ${DOMINO_DATA_DIR};\
${DOMINO_BIN_DIR}/server -q"
;;
*)
echo "Usage: domino {start|stop}"
exit 1
esac
# End of the domino script