付録E.4 スクリプトファイルの例

<この項の構成>
(1) 始動スクリプトの例
(2) 停止スクリプトの例
(3) 監視スクリプトの例

(1) 始動スクリプトの例

Address Serer - Data Collectionの始動スクリプトの例を記述します。Address Server - Data Collectionの起動スクリプトは必ずAddress/Mail Serverの始動スクリプトの後に記述してください。

(Object Serverの起動処理)

(Address/Mail Serverの起動処理)

# Address Server - Data Collectionの起動処理
/opt/GAColct/tool/gcolsrv -start
if [ $? -ne 0 ]
then
exit 255
fi

(2) 停止スクリプトの例

Address Serer - Data Collectionの停止スクリプトの例を記述します。Address Server - Data Collectionの起動スクリプトは必ずAddress/Mail Serverの始動スクリプトの前に記述してください。

# Address Server - Data Collectionの停止処理
/opt/GAColct/tool/gcolsrv -stop

(Address/Mail Serverの停止処理)

(Object Serverの停止処理)

(3) 監視スクリプトの例

Address Serer - Data Collectionの監視スクリプトの例を記述します。

# Address Server - Data Collectionの監視処理
colst=`/opt/GAColct/tool/gcolsrv -status | grep KDGD202-I`
runst=`echo $colst | sed "s@^.*(@@" | sed "s@)@@"`

if [ "$runst" != "running" ]
then
       exit 255
fi