Index: trunk/MagicSoft/Mars/datacenter/scripts/dowebplots
===================================================================
--- trunk/MagicSoft/Mars/datacenter/scripts/dowebplots	(revision 7460)
+++ trunk/MagicSoft/Mars/datacenter/scripts/dowebplots	(revision 7486)
@@ -33,4 +33,5 @@
 
 user=`whoami`
+program=dowebplots
 source /home/$user/Mars/datacenter/scripts/sourcefile
 
@@ -51,15 +52,5 @@
 # check if script is already running
 lockfile=$lockpath/lock-dowebplots.txt
-date > $lockfile >> $scriptlog 2>&1 
-checklock0=$?
-case $checklock0 in 
-    0)   echo "checklock0=$checklock0 -> continue " >> $scriptlog 2>&1;;
-    1)   echo "checklock0=$checklock0 -> file exists " >> $scriptlog 2>&1
-         echo "-> for datacheck is running -> exit" >> $scriptlog 2>&1
-         date  >> $scriptlog 2>&1
-         exit;;
-    *)   echo "checklock0=$checklock0 -> something went completely wrong" >> $scriptlog 2>&1;;
-esac
-
+checklock  >> $scriptlog 2>&1
 
 #finding all rootfiles in the webdirectory 
