/opt/lotus/bin/server < input > output2. ドミノの停止
/opt/lotus/bin/server -q3. 起動スクリプト
#!/bin/sh NOTES_USER=notes NOTES_PATH=/local/notesdata OUTPUT_LOG=/var/log/notes/$NOTES_USER.log PATH=$PATH:$NOTES_PATH:/opt/lotus/bin if [ `id -u` = 0 ] then echo "Run the Domino Server as the notes user" exit 1 fi if [ ! -x /opt/lotus/bin/server ] then echo "Notes: Cannot access server command - exiting" exit 1 fi if [ ! -d $NOTES_PATH ] then echo "Notes: Cannot access notes data directory - exiting" exit 1 fi cd $NOTES_PATH if [ -a $OUTPUT_LOG ] then cp -p $OUTPUT_LOG $OUTPUT_LOG.`date +"%m%d%y_%H%M"` fi echo "Starting Domino 5 server ... " /opt/lotus/bin/server < /local/notesdata/.passwd > $OUTPUT_LOG 2>&1 &4. 停止スクリプト
#!/bin/sh NOTES_USER=notes NOTES_PATH=/local/notesdata OUTPUT_LOG=/var/log/notes/$NOTES_USER.log INPUT_FILE=$NOTES_PATH/$NOTES_USER.input echo "Stopping the Domino 5 Server for Linux" echo " ... waiting for shutdown to complete" cd $NOTES_PATH /opt/lotus/bin/server -q > /dev/null 2>&1 & count=0 NOTES_RUNNING=`ps -ef | grep /opt/lotus/notes | grep -v grep` while [ -n $NOTES_RUNNING ] ; do sleep 10 count=`expr $count + 1` echo " ... waiting "$count"0 seconds" if [ $count = 13 ] then echo "Domino Server is still running after 2 minutes" echo " ... now for the ungraceful method" for i in `ps -ef | grep /opt/lotus/notes | grep -v grep | awk '{ print $2 }'` do kill -9 $i done echo " ... Notes server TERMINATED" exit fi NOTES_RUNNING=`ps -ef | grep /opt/lotus/notes | grep -v grep` done echo "Notes server ended cleanly" exit 05. スタートアップスクリプト
#!/bin/sh . /etc/rc.d/init.d/functions case "$1" in start) echo -n "Starting Lotus Domino server: " if [ -d /local/notesdata -a -f /opt/lotus/bin/server ] ; then su notes -c /opt/lotus/bin/start_server fi touch /var/lock/subsys/notes ;; stop) echo -n "Shutting down Lotus Domino server: " su notes -c /opt/lotus/bin/stop_server rm -f /var/lock/subsys/notes echo ;; restart|reload) $0 stop $0 start ;; *) echo "Usage: notes {start|stop|restart|reload}" exit 1 esac exit 06. サーバパスワードのファイル準備
<サーバIDのパスワード>7. スタートアップファイルの登録
> cd /etc/rc.d/rc3.d > ln -fs ../init.d/notes S99notes > cd /etc/rc.d/rc5.d > ln -fs ../init.d/notes S99notes > cd /etc/rc.d/rc0.d > ln -fs ../init.d/notes K99notes > cd /etc/rc.d/rc6.d > ln -fs ../init.d/notes K99notesこれで、自動起動/停止されるはずです。 リブートするまえに下記のように一旦テストしてみてください。 手動にて起動する場合は下記のようにします。
> cd /etc/rc.d/init.d > ./notes start停止する場合は下記のようにします。
> cd /etc/rc.d/init.d > ./notes stop最後は実際に再起動及び停止してみて、自動起動・停止の機能が効いているか確認し完了します。
※注意: 再起動/停止する際は init コマンドを使用します。 reboot/shutdownだと適切な終了処理を行ないません。