You are on page 1of 2

#! /bin/ksh ############################################################################### # # # Script to check the status of Forms server # # # ############################################################################### LOG_FILE_FRM=Forms_reporst_status_$1.log if [ $?

-ne 0 ] ; then exit 1 else { usage() { echo "$0 - Script to check the status of Forms server " echo "Pre-req : Instance name must be specified" echo "Usage : $0 <Instance Name>" echo "This will report the forms server availability" echo } if [ $# -lt 1 ] then usage echo "Error: Insufficient arguments." exit 1 fi # Declaration / Initialization Part inst_name=$1 unix_id=`id | cut -f1 -d " " | cut -f2 -d "("| cut -f1 -d ")"` if [ x_id then echo exit fi ` echo $inst_name | sed 's/.*\(...\)$/\1/' | tr [A-Z] [a-z] ` != `echo $uni | sed 's/.*\(...\)$/\1/'` ] ; "Run the script as applmgr user" 1

env_file=/app/$unix_id/$1/appl/APPSORA.env if [ -s /app/$unix_id/$1/appl/APPSORA.env ] ; then . $env_file > /dev/null 2>&1 else echo "/app/$unix_id/$1/appl/APPSORA.env file not found" exit 1 fi # Main routine call for validation $COMMON_TOP/admin/scripts/$CONTEXT_NAME/adfrmctl.sh status > $LOG_FILE_FRM if [ $? -eq 1 ] ; then { #echo `grep -i stop $LOG_FILE_FRM` | mail -s <notify> echo `grep -i stop $LOG_FILE_FRM` | mail -s <notify> grep -i 'stop' $LOG_FILE_FRM | mailx -s "Forms Service of $1" <mob>@nma.vodafone .in

exit 1 } fi } fi exit 0

You might also like