#!/bin/sh
#* ----------------------------------------------------------------------
#*               Proprietary and Confidential Information
#*
#* This material contains, and is part of a computer software program
#* which is, proprietary and confidential information owned by CA, INC. 
#* The program, including this material, may not be duplicated, disclosed
#* or reproduced in whole or in part for any purpose without the express
#* written authorization of CA. All authorized reproductions must be
#* marked with this legend.
#*
#*                      Copyright (c) 2006  CA, Inc.
#*                          All rights reserved
#*
#* ----------------------------------------------------------------------
#
set +u

# cshut for CA Message Queuing [CAM]
#
if [ -z "$CAI_MSQ" ]
then
    if [ -f /etc/catngcampath ]
    then
        CAI_MSQ="`cat  /etc/catngcampath`"
    else
        echo "CAM does not seem to be installed properly and fallback"
        echo "action cannot be taken to avoid the problem." 
        echo " "
        exit 1
    fi
fi

if [ -x "$CAI_MSQ/bin/camclose" ]
then
    "$CAI_MSQ/bin/camclose" 2> /dev/null
else
    echo "Unable to close CAM server as '$CAI_MSQ/bin/camclose' cannot be called"
fi

