#! /bin/csh set oasis=/oasis set lockfile=$oasis/bin/download.lock set record_file=$oasis/raw/oasis.rcd set nonomatch #set FAILMAIL = "rich@mbari.org,jared@mbari.org,dfrench@mbari.org,kemi@mbari.org" set FAILMAIL = "rich@mbari.org" set MAIL = "/bin/mailx -s " set MAIL_SUBJECT = "Possible OASIS Download Lockfile Error" if ( -e $lockfile ) then echo Process already running: Exiting $MAIL "$MAIL_SUBJECT" $FAILMAIL << ! /oasis/bin/download has aborted without attempting a download. This is because it detected a pre-existing download.lock file in the /oasis/bin directory. Some possible causes for this are: 1) another instance of the download script is running normally. 2) another instance of the download script is hung. 3) a previous instance of the download script bombed and did not finish and thus did not delete the download.lock file. ! exit endif #echo Creating lock file... touch $lockfile #echo Downloading M1 $oasis/bin/getM1 ### now get the oa1 and oa2 moorings #### disabled approx 27Jun2012.. oa1 radio or can is dead #### 25Jul2012 still down... radio is now back in lab for testing #### $oasis/bin/getOA1 >> $oasis/getOA1.out #### disabled 03Apr3013 in prep for turnaround -rschramm #### $oasis/bin/getOA2 >> $oasis/getOA2.out #echo Downloading M46044 #### turned off on 05-Nov-2012 $oasis/bin/getM2H echo Deleting lock file... rm -rf $lockfile #echo Normal Exit exit