|
Last change
on this file since 18869 was 18708, checked in by Daniela Dorner, 9 years ago |
|
avoid warnings for missing files for the first few days; fixed bug in finding start and stop time; improved logging
|
-
Property svn:executable
set to
*
|
|
File size:
1.6 KB
|
| Line | |
|---|
| 1 | #!/bin/bash
|
|---|
| 2 | #
|
|---|
| 3 |
|
|---|
| 4 | source `dirname $0`/../Sourcefile.sh
|
|---|
| 5 | printprocesslog "INFO starting $0"
|
|---|
| 6 | program=CheckAuxFilesAvail
|
|---|
| 7 | step=AuxFilesAvailISDC
|
|---|
| 8 |
|
|---|
| 9 | set -C
|
|---|
| 10 |
|
|---|
| 11 | # check if script is already running
|
|---|
| 12 | lockfile=$lockpath/lock-$program.txt
|
|---|
| 13 | checklock
|
|---|
| 14 |
|
|---|
| 15 | # get todo list
|
|---|
| 16 | gettodo
|
|---|
| 17 |
|
|---|
| 18 |
|
|---|
| 19 | for (( s=0 ; s < $num ; s++ ))
|
|---|
| 20 | do
|
|---|
| 21 | night=${primaries[$s]}
|
|---|
| 22 | setstatus "start"
|
|---|
| 23 |
|
|---|
| 24 | auxpath=$auxdata"/"`echo $night | cut -c 1-4`/`echo $night | cut -c 5-6`/`echo $night | cut -c 7-8`
|
|---|
| 25 | drivefile=$auxpath/$night".DRIVE_CONTROL_TRACKING_POSITION.fits"
|
|---|
| 26 | weatherfile=$auxpath/$night".MAGIC_WEATHER_DATA.fits"
|
|---|
| 27 | ratesfile=$auxpath/$night".FTM_CONTROL_TRIGGER_RATES.fits"
|
|---|
| 28 | temperaturefile=$auxpath/$night".FSC_CONTROL_TEMPERATURE.fits"
|
|---|
| 29 | humidityfile=$auxpath/$night".FSC_CONTROL_HUMIDITY.fits"
|
|---|
| 30 |
|
|---|
| 31 | test -e $drivefile
|
|---|
| 32 | check1=$?
|
|---|
| 33 | test -e $weatherfile
|
|---|
| 34 | check2=$?
|
|---|
| 35 | test -e $ratesfile
|
|---|
| 36 | check3=$?
|
|---|
| 37 | test -e $temperaturefile
|
|---|
| 38 | check4=$?
|
|---|
| 39 | test -e $humidityfile
|
|---|
| 40 | check5=$?
|
|---|
| 41 |
|
|---|
| 42 | totalcheck=`echo $check1 + $check2 + $check3 + $check4 + $check5 | bc -l`
|
|---|
| 43 | totalcheck2=${check1}${check2}${check3}${check4}${check5}
|
|---|
| 44 |
|
|---|
| 45 | case $totalcheck in
|
|---|
| 46 | 0) printprocesslog "INFO found auxfiles for night "$night"."
|
|---|
| 47 | ;;
|
|---|
| 48 | *) if [ $night -lt $checknight ]
|
|---|
| 49 | then
|
|---|
| 50 | printprocesslog "WARN "$totalcheck" auxiliary files missing ("$totalcheck2") for night "$night"."
|
|---|
| 51 | check=$totalcheck2
|
|---|
| 52 | else
|
|---|
| 53 | check="no"
|
|---|
| 54 | printprocesslog "INFO "$totalcheck" auxiliary files missing ("$totalcheck2") for night "$night"."
|
|---|
| 55 | fi
|
|---|
| 56 | ;;
|
|---|
| 57 | esac
|
|---|
| 58 |
|
|---|
| 59 | setstatus "stop"
|
|---|
| 60 | done
|
|---|
| 61 |
|
|---|
| 62 | finish
|
|---|
| 63 |
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.