#! /bin/csh
# chkmoor - C shell script to make sure there's only one copy of download 
#	    script running
#

# Look for another instantiation of 'getmoor'
set fname = `mktemp -p"."`
rm -f $fname
ps -ef | fgrep getmoor | fgrep -v fgrep > $fname
if (-e $fname && !(-z $fname)) then
	/usr/local/oasis/bin/kill_oasis

	mailx -s "Killed OASIS Download" $failmail << !
	Killed OASIS download process
	`date`
!
endif
rm -f $fname
