|
Last change
on this file since 13064 was 13055, checked in by Daniela Dorner, 14 years ago |
|
adapted scripts to changes in directory structure
|
-
Property svn:executable
set to
*
|
|
File size:
1.3 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 |
|
|---|
| 47 | setstatus "stop"
|
|---|
| 48 | done
|
|---|
| 49 |
|
|---|
| 50 | finish
|
|---|
| 51 |
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.