Last change
on this file since 13452 was 13288, checked in by Daniela Dorner, 13 years ago |
added (script to check availability of DRIVE_CONTROL_TRACKING_POSITION.fits)
|
-
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=CheckDriveFileAvail
|
---|
7 | step=DriveFileAvailISDC
|
---|
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 |
|
---|
26 | setstatus "start"
|
---|
27 |
|
---|
28 | auxpath=$auxdata"/"`echo $night | cut -c 1-4`/`echo $night | cut -c 5-6`/`echo $night | cut -c 7-8`
|
---|
29 | drivefile=$auxpath/$night".DRIVE_CONTROL_TRACKING_POSITION.fits"
|
---|
30 |
|
---|
31 | test -e $drivefile
|
---|
32 | check1=$?
|
---|
33 | case $check1 in
|
---|
34 | 0) printprocesslog "INFO found "$drivefile
|
---|
35 | ;;
|
---|
36 | *) if [ $night -lt $checknight ]
|
---|
37 | then
|
---|
38 | printprocesslog "WARN "$drivefile" missing (check1="$check1")."
|
---|
39 | check=$check1
|
---|
40 | else
|
---|
41 | check="no"
|
---|
42 | printprocesslog "INFO "$drivefile" missing (check1="$check1")."
|
---|
43 | fi
|
---|
44 | ;;
|
---|
45 | esac
|
---|
46 |
|
---|
47 | setstatus "stop"
|
---|
48 | done
|
---|
49 |
|
---|
50 | finish
|
---|
51 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.