Last change
on this file since 13093 was 13093, checked in by Daniela Dorner, 13 years ago |
added drs file to transfer
|
-
Property svn:executable
set to
*
|
File size:
2.0 KB
|
Line | |
---|
1 | #!/bin/bash
|
---|
2 | #
|
---|
3 |
|
---|
4 | source `dirname $0`/../Sourcefile.sh
|
---|
5 | printprocesslog "INFO starting $0"
|
---|
6 | program=RsyncRawToWue
|
---|
7 | step=RawFileAvailWue
|
---|
8 |
|
---|
9 | set -C
|
---|
10 |
|
---|
11 | logfile=$runlogpath"/RsyncRawToWue-"$datetime".log"
|
---|
12 | date >> $logfile
|
---|
13 |
|
---|
14 | # check if script is already running
|
---|
15 | lockfile=$lockpath/lock-$program.txt
|
---|
16 | checklock
|
---|
17 |
|
---|
18 | # get todo list
|
---|
19 | gettodo
|
---|
20 |
|
---|
21 |
|
---|
22 | for (( s=0 ; s < $num ; s++ ))
|
---|
23 | do
|
---|
24 | night=${primaries[$s+$s]}
|
---|
25 | runid=${primaries[$s+$s+1]}
|
---|
26 | nightpath=`echo $night | cut -c 1-4`"/"`echo $night | cut -c 5-6`"/"`echo $night | cut -c 7-8`
|
---|
27 |
|
---|
28 | setstatus "start"
|
---|
29 |
|
---|
30 | rawfileisdc="/scratch/from_lapalma/raw/./"$nightpath"/"$night"_"`printf %03d $runid`".fits.gz"
|
---|
31 | rawdirwue="/fact/raw/"
|
---|
32 |
|
---|
33 | printprocesslog "INFO rsync rawfile "$rawfileisdc" to Wue "$rawdirwue
|
---|
34 | #rsync -rltDvR --partial --stats --password-file=/home_nfs/isdc/fact_opr/rsync.pwd factdata@161.72.93.131::$rawfilelp $rawdirisdc >> $logfile 2>&1
|
---|
35 | rsync -avxR --no-p --stats $rawfileisdc operator@coma.astro.uni-wuerzburg.de:$rawdirwue >> $logfile 2>&1
|
---|
36 | check1=$?
|
---|
37 |
|
---|
38 | case $check1 in
|
---|
39 | 0) printprocesslog "INFO rawfile "$rawfileisdc" transferred successfully to Wue."
|
---|
40 | ;;
|
---|
41 | *) printprocesslog "WARN "$rawfileisdc" could not be transferred to Wue."
|
---|
42 | check=$check1
|
---|
43 | ;;
|
---|
44 | esac
|
---|
45 |
|
---|
46 | query="SELECT fHasDrsFile from RunInfo WHERE fNight="$night" AND fRunID="$runid
|
---|
47 | numdrs=`sendquery`
|
---|
48 | if [ $numdrs -gt 0 ]
|
---|
49 | then
|
---|
50 | drsfileisdc=$rawdirisdc$nightpath"/"$night"_"`printf %03d $runid`".drs.fits.gz"
|
---|
51 | printprocesslog "INFO rsync rawfile "$drsfileisdc" to Wue "$rawdirwue
|
---|
52 | rsync -avxR --no-p --stats $rawfileisdc operator@coma.astro.uni-wuerzburg.de:$rawdirwue >> $logfile 2>&1
|
---|
53 | check1=$?
|
---|
54 |
|
---|
55 | case $check1 in
|
---|
56 | 0) printprocesslog "INFO rawfile "$drsfileisdc" transferred successfully to Wue."
|
---|
57 | ;;
|
---|
58 | *) printprocesslog "WARN "$drsfileisdc" could not be transferred to Wue."
|
---|
59 | check=$check1
|
---|
60 | ;;
|
---|
61 | esac
|
---|
62 | fi
|
---|
63 |
|
---|
64 | setstatus "stop"
|
---|
65 | done
|
---|
66 |
|
---|
67 | finish
|
---|
68 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.