Last change
on this file since 15602 was 15384, checked in by Daniela Dorner, 12 years ago |
added (script to check if file FTM_CONTROL_TRIGGER_RATES is available at ISDC, needed for merpp)
|
-
Property svn:executable
set to
*
|
File size:
1.1 KB
|
Line | |
---|
1 | #!/bin/bash
|
---|
2 | #
|
---|
3 |
|
---|
4 | source `dirname $0`/../Sourcefile.sh
|
---|
5 | printprocesslog "INFO starting $0"
|
---|
6 | program=CheckRatesFileAvail
|
---|
7 | step=RatesFileAvailISDC
|
---|
8 | transferdelay=3 #days
|
---|
9 |
|
---|
10 | set -C
|
---|
11 |
|
---|
12 | # check if script is already running
|
---|
13 | lockfile=$lockpath/lock-$program.txt
|
---|
14 | checklock
|
---|
15 |
|
---|
16 | # get todo list
|
---|
17 | gettodo
|
---|
18 |
|
---|
19 |
|
---|
20 | for (( s=0 ; s < $num ; s++ ))
|
---|
21 | do
|
---|
22 | night=${primaries[$s]}
|
---|
23 | currentnight=`date +%Y%m%d`
|
---|
24 | #checknight=`echo " $currentnight - $transferdelay " | bc -l`
|
---|
25 | checknight=`date +%Y%m%d --date="-${transferdelay}day"`
|
---|
26 |
|
---|
27 | setstatus "start"
|
---|
28 |
|
---|
29 | auxpath=$auxdata"/"`echo $night | cut -c 1-4`/`echo $night | cut -c 5-6`/`echo $night | cut -c 7-8`
|
---|
30 | ratesfile=$auxpath/$night".FTM_CONTROL_TRIGGER_RATES.fits"
|
---|
31 |
|
---|
32 | test -e $ratesfile
|
---|
33 | check1=$?
|
---|
34 | case $check1 in
|
---|
35 | 0) printprocesslog "INFO found "$ratesfile
|
---|
36 | ;;
|
---|
37 | *) if [ $night -lt $checknight ]
|
---|
38 | then
|
---|
39 | printprocesslog "WARN "$ratesfile" missing (check1="$check1")."
|
---|
40 | check=$check1
|
---|
41 | else
|
---|
42 | check="no"
|
---|
43 | printprocesslog "INFO "$ratesfile" missing (check1="$check1")."
|
---|
44 | fi
|
---|
45 | ;;
|
---|
46 | esac
|
---|
47 |
|
---|
48 | setstatus "stop"
|
---|
49 | done
|
---|
50 |
|
---|
51 | finish
|
---|
52 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.