#! /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,erich@mbari.org,dfrench@mbari.org,kemi@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 #### reenable the following two lines to resume M1 downloads #$oasis/bin/getM1 #$oasis/bin/util/m1 >/tmp/m1.out # M2-2010 #### m2 pulled on 28-sep-2011 ### $oasis/bin/getM2 #echo Downloading M46044 $oasis/bin/getM2H #echo Downloading OA1.. #$oasis/bin/getOA1 #echo Downloading OA2. #$oasis/bin/getOA2 echo Deleting lock file... rm -rf $lockfile #echo Normal Exit exit