head	1.1;
access;
symbols
	Hobson_Rock_14Dec2009:1.1
	BEFORE_VCS_CHANGE:1.1
	Hobson_Rock_16Oct2009:1.1
	Hobson_Rock_29June2009:1.1
	mar19_2009:1.1
	mar18_2009:1.1
	feb13_2009:1.1
	feb10-2009:1.1
	feb09-2009:1.1
	dec15_2008:1.1
	dec12_2008:1.1
	ST_10_5:1.1
	ST_10_4b:1.1
	ST_10_4:1.1
	ST_10_3:1.1
	ST10_HW:1.1
	ST_10_2:1.1
	ST_10_1:1.1
	ST_10_0:1.1
	AUTONOMY_BRANCH:1.1.0.2
	AUTONOMY:1.1
	AUTONOMY-2008_07_30:1.1;
locks; strict;
comment	@# @;


1.1
date	2004.11.05.19.56.25;	author sib;	state Exp;
branches;
next	;


desc
@@


1.1
log
@Simple version that does not know if the drop weight server was running when
contact was lost.
@
text
@#! /bin/bash
#
# PURPOSE:      Reset the dropweight watchdog from the ship.
# FIRST AUTHOR: Rob McEwen, 3 Nov 2004, a sad day.
# CHANGE LOG:
#
CNTCT=0    #Contact state.  0 => AUV present; 1 => no contact.
DATE=`date`
while [ true ]; do 
    clear;
    if [ $CNTCT = 0 ]; then
	echo "Contact regained at $DATE"
    else
	echo "Contact lost at $DATE"
    fi
    rsh -l dorado1 mvc-mb 'if [ `slay -pQ dropWeightServer` ]; then echo "DropWeightServer Detected"; else "reset"; fi'
    RETVAL=$?
    if [ $RETVAL != 0 ] ; then
	CNTCT=1
	sleep 5
    else
	if [ $CNTCT = 1 ]; then
	    DATE=`date`
	fi
	CNTCT=0
	sleep 10
    fi
done
@
