Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Script Syntax Error

Status
Not open for further replies.

jidone

Programmer
Mar 5, 2002
5
CA
RECEIVING THE FOLLOWING ERROR when trying to run this script below

./hdgh_monitor_mon[11]: 0403-057 Syntax error at line 22 : `elif' is not expected.


set 1 /opt/quovadx/qdx5.1/integrator
set 2 ms4test
setroot $1 $2
err=no
file=$HCISITEDIR/exec/hcimonitord/pid
flag=$3
DISPLAY=99.999.999.9:0
LABEL="Monitor Daemon Error"
whoto="test@test.com"
contact_msg="Contact the primary oncall person"
if [ ! -f $file ]; then
msg="The monitor daemon on $2 has aborted."
check_panic=`cat $HCISITEDIR/exec/hcimonitord/hcimonitord.log | egrep "PANIC|signal 11"`
if [ -n "$check_panic" ]; then
err=yes
fi
else
pid=`cat $file`
if [ `ps -ef | grep hcimonitord | grep $pid | wc -l` != 1 ]; then
msg="The Monitor Daemon for $HCISITE is not running."
err=yes
elif ! hciconnstatus 1>/dev/null 2>>/hci/tmp/connstatus_err
then
echo `date` >> /hci/tmp/connstatus_err
msg="The Monitor Daemon for $HCISITE is frozen."
err=yes
fi
fi
if [ "$err" = "yes" ]; then
if [ "$flag" = "nomore" ]; then
hciguimsg -message "$msg $contact_msg" -alert -display $DISPLAY -label $LABEL &
sendpage 5631608 "$msg"
echo "$msg" | mail -s "Monitor Daemon Alert" $whoto
else
echo "$msg. Will try to stop/start daemon and re-check"
hcisitectl -k m
hcisitectl -s m
echo "monitor_mon $1 $2 nomore" | at now + 2 minutes
fi
fi
 
Did you really wanted to publish in the Tcl forum?
Your script is NOT a Tcl script.

HTH

ulis
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top