TeamWARE Office 200X V2.0 管理者ガイド
目次 索引 前ページ次ページ

第4章 TeamWARE Officeの起動と停止> 4.3 TeamWARE Officeの自動起動

4.3.5 Solarisでの自動起動の設定

Solarisの場合、TeamWARE Officeをインストールすると、/etc/rc2.dディレクトリにS97teamwareというファイル名で自動起動のスクリプトが格納されます。このスクリプトによって、次回のシステム起動時にTeamWARE Officeが自動起動されます。図4.1に、S97teamwareスクリプトの内を示します。

#!/bin/sh
#
# S97teamware - TeamWARE server startup script for Unix
#
# Copyright (C) TeamWARE Group Oy 1996 and Fujitsu Limited 1996
# and/or their licensors
#

# Set the TeamWARE root directory.
TO=`nawk -F= '/INSTDIR/ {print $2}' /usr/lib/two/inst.ini`
export TO
# Chdir to TeamWARE directory.
if [ ! -d $TO ] ; then
echo "TeamWARE root directory $TO not found."
exit 1
fi
cd $TO || exit 2

# Set TeamWARE user name.
USER=`nawk -F= '/TWADMIN/ {print $2}' /usr/lib/two/inst.ini`
export USER

# Check TeamWARE shell.
if [ ! -x $TO/to ] ; then
echo "TeamWARE server shell $TO/to not found."
exit 3
fi

# Start or stop.
case "$1" in

start)
# It is recommended that resume is run manually and only when necessary.
# echo "Conditioning TeamWARE databases"
# su - $USER -c "$TO/to resume directory"
# su - $USER -c "$TO/to resume mail"
# su - $USER -c "$TO/to resume calendar"
# su - $USER -c "$TO/to resume library"
# su - $USER -c "$TO/to resume forum"
echo "Starting TeamWARE server"
su - $USER -c "$TO/to start >$TO/boot.log &"
;;
stop)
echo "Stopping TeamWARE server"
su - $USER -c "$TO/to stop"
;;
esac

# end of S97teamware

[図4.1 S97teamwareスクリプトの内容]


目次 索引 前ページ次ページ

Copyright(C) TeamWARE Group Oy 2005 and Fujitsu Limited 2005 and/or their licensors