Index: trunk/DataCheck/RsyncAux.sh
===================================================================
--- trunk/DataCheck/RsyncAux.sh	(revision 12970)
+++ trunk/DataCheck/RsyncAux.sh	(revision 12971)
@@ -1,17 +1,33 @@
 #!/bin/bash
 
-today=`date +%F`
-logfile=/home/`whoami`/DataCheck/log/RsyncAux$today.log
+# this script has been written to run on La Palma on the machine data
+#   i.e. paths are only working on this machine
 
-echo "" >> $logfile 2>&1
-echo "" >> $logfile 2>&1
-echo "" >> $logfile 2>&1
+source `dirname $0`/Sourcefile.sh
+printprocesslog "INFO starting "$0
+
+logfile=$runlogpath"/RsyncAuxLP-"$datetime".log"
+date >> $logfile
 
 # check if /daq is mounted on data
 if ! mount | grep daq >> $logfile 2>&1
 then 
-   echo "/daq is not mounted on data => please mount it"
-   exit
+   printprocesslog "ERROR /daq is not mounted on data => please mount it"
+   echo `date`": /daq is not mounted on data => please mount it"
+   finish
 fi
+
+# check if paths are available
+if ! ls /daq/aux >/dev/null 2>&1
+then 
+   printprocesslog "ERROR /daq/aux is not available."
+   finish
+fi
+if ! ls /loc_data/aux >/dev/null 2>&1
+then 
+   printprocesslog "ERROR /loc_data/aux is not available."
+   finish
+fi
+
 
 # get last 3 nights
@@ -26,4 +42,5 @@
    if ! [ -d $auxdirdaq ]
    then 
+      printprocesslog "WARN "$auxdirdaq" not found. Data were probably taken on data" >> $logfile 2>&1
       echo `date`": "$auxdirdaq" not found. Data were probably taken on data" >> $logfile 2>&1
       continue
@@ -34,4 +51,5 @@
       mkdir -pv $auxdirdata >> $logfile 2>&1
    fi
+   printprocesslog "INFO processing files in "$auxdirdaq >> $logfile 2>&1
    echo `date`": processing files in "$auxdirdaq >> $logfile 2>&1
    
@@ -43,7 +61,9 @@
       # limit bw for rsync to 20 MB/s during night
       bwlimit="--bwlimit=20000"
+      printprocesslog "INFO rsync data with "$bwlimit >> $logfile 2>&1
       echo "rsync data with "$bwlimit >> $logfile 2>&1
    else 
       # no bw limit during day
+      printprocesslog "INFO rsync data without bwlimit" >> $logfile 2>&1
       echo "rsync data without bwlimit" >> $logfile 2>&1
    fi
@@ -53,4 +73,5 @@
    if ! /usr/bin/rsync -avxHP $bwlimit $auxdirdaq $auxdirdata >> $logfile 2>&1
    then
+      printprocesslog "WARN problem rsyncing auxiliary data for "$date" from daq to data"
       echo `date`": problem rsyncing auxiliary data for "$date" from daq to data"
    fi
Index: trunk/DataCheck/RsyncRaw.sh
===================================================================
--- trunk/DataCheck/RsyncRaw.sh	(revision 12970)
+++ trunk/DataCheck/RsyncRaw.sh	(revision 12971)
@@ -1,16 +1,31 @@
 #!/bin/bash
 
-today=`date +%F`
-logfile=/home/`whoami`/DataCheck/log/RsyncRaw$today.log
+# this script has been written to run on La Palma on the machine data
+#   i.e. paths are only working on this machine
 
-echo "" >> $logfile 2>&1
-echo "" >> $logfile 2>&1
-echo "" >> $logfile 2>&1
+source `dirname $0`/Sourcefile.sh
+printprocesslog "INFO starting "$0
+
+logfile=$runlogpath"/RsyncRawLP-"$datetime".log"
+date >> $logfile
 
 # check if /daq is mounted on data
 if ! mount | grep daq >> $logfile 2>&1
 then 
-   echo "/daq is not mounted on data => please mount it"
-   exit
+   printprocesslog "ERROR /daq is not mounted on data => please mount it"
+   echo `date`": /daq is not mounted on data => please mount it"
+   finish
+fi
+
+# check if paths are available
+if ! ls /daq/raw >/dev/null 2>&1
+then 
+   printprocesslog "ERROR /daq/raw is not available."
+   finish
+fi
+if ! ls /loc_data/raw >/dev/null 2>&1
+then 
+   printprocesslog "ERROR /loc_data/raw is not available."
+   finish
 fi
 
@@ -27,4 +42,5 @@
    then 
       echo `date`": "$rawdirdaq" not found. Data were probably taken on data" >> $logfile 2>&1
+      printprocesslog "WARN "$rawdirdaq" not found. Data were probably taken on data" >> $logfile 2>&1
       continue
    fi
@@ -34,4 +50,5 @@
       mkdir -pv $rawdirdata >> $logfile 2>&1
    fi
+   printprocesslog "INFO processing files in "$rawdirdaq >> $logfile 2>&1
    echo `date`": processing files in "$rawdirdaq >> $logfile 2>&1
 
@@ -43,7 +60,9 @@
       # limit bw for rsync to 20 MB/s during night
       bwlimit="--bwlimit=20000"
+      printprocesslog "INFO rsync data with "$bwlimit >> $logfile 2>&1
       echo "rsync data with "$bwlimit >> $logfile 2>&1
    else
       # no bw limit during day
+      printprocesslog "INFO rsync data without bwlimit" >> $logfile 2>&1
       echo "rsync data without bwlimit" >> $logfile 2>&1
    fi
@@ -53,7 +72,9 @@
    if ! /usr/bin/rsync -avxHP $bwlimit $rawdirdaq $rawdirdata >> $logfile 2>&1
    then
+      printprocesslog "WARN problem rsyncing rawdata for "$date" from daq to data"
       echo `date`": problem rsyncing rawdata for "$date" from daq to data"
    fi
 done
 
+finish
 
