#!/usr/bin/bash
#CONFIG=--config /etc/sysconfig/cern-get-certificate
LOG=/var/log/cern-get-certificate.log 
SLEEP=$(( ( $RANDOM % 10 ) * 60 ))
/bin/echo -n `/bin/date  +'%b %d %H:%M:%S :'` >> $LOG 2>&1
/bin/echo "sleeping for $SLEEP seconds to avoid servers overload" >> $LOG 2>&1
/bin/sleep $SLEEP
/bin/echo -n `/bin/date  +'%b %d %H:%M:%S :'` >> $LOG 2>&1
/usr/sbin/cern-get-certificate --cron $CONFIG >> $LOG 2>&1 
/bin/echo -n `/bin/date  +'%b %d %H:%M:%S :'` >> $LOG 2>&1
/usr/sbin/cern-get-certificate --cron --grid $CONFIG >> $LOG 2>&1 
