Index: trunk/MagicSoft/Mars/datacenter/scripts/checkstardone
===================================================================
--- trunk/MagicSoft/Mars/datacenter/scripts/checkstardone	(revision 9113)
+++ trunk/MagicSoft/Mars/datacenter/scripts/checkstardone	(revision 9355)
@@ -40,13 +40,10 @@
 column=fStarFilesAvail
 
-scriptlog=$runlogpath/$program-$datetime.log
-date >> $scriptlog 2>&1
-
 # check if script is already running
 lockfile=$lockpath/lock-$program.txt
-checklock  >> $scriptlog 2>&1
+checklock 
 
 # get todo list
-gettodo  >> $scriptlog 2>&1
+gettodo 
 
 cd $mars
@@ -55,26 +52,22 @@
 do
    dataset=${primaries[$s]}
-   echo "checking star done for sequences of dataset $dataset..." >> $scriptlog 2>&1 
    printprocesslog "INFO checking star done for sequences of dataset $dataset"
 
    outpath=$logpath/$program/`printf %08d $dataset | cut -c 0-5`
-   makedir $outpath  >> $scriptlog 2>&1 
+   makedir $outpath 
 
-   setstatus "start" >> $scriptlog 2>&1
+   setstatus "start" 
 
    check1=`root -q -b $macrospath/checkstardone.C+\($dataset\) | tee $outpath/checkstardone-$dataset.log | intgrep`
 
    case $check1 in
-      1)   echo " check1=$check1 -> everything ok -> continue with next dataset..." >> $scriptlog 2>&1 ;;
-      2)   echo " check1=$check1 -> star files for dataset $dataset not yet available -> continue..." >> $scriptlog 2>&1 
-           printprocesslog "INFO files not yet available for dataset $dataset"
+      1)   printprocesslog "INFO check1=$check1 -> everything ok -> continue with next dataset..." 
+      2)   printprocesslog "INFO files not yet available for dataset $dataset (check1=$check1)"
            check="no"
            ;;
-      0)   echo " check1=$check1 -> no connection to db -> continue..." >> $scriptlog 2>&1 
-           printprocesslog "WARN connection to DB failed"
+      0)   printprocesslog "WARN connection to DB failed (check1=$check1)"
            check="no"
            ;;
-      *)   echo " check1=$check1 -> ERROR checkstardone.C failed for dataset $dataset" >> $scriptlog 2>&1 
-           printprocesslog "ERROR checkstardone.C failed for dataset $dataset"
+      *)   printprocesslog "ERROR checkstardone.C failed for dataset $dataset (check1=$check1)"
            com=$Fstardone
            check=$check1
@@ -82,6 +75,6 @@
    esac
 
-   setstatus "stop" >> $scriptlog 2>&1
+   setstatus "stop" 
 done
 
-finish >> $scriptlog 2>&1
+finish 
