1 |
#!/bin/bash |
2 |
|
3 |
source /gpfs/wizard/flight/production/installed/set_pam_env.sh > /dev/null 2>&1; |
4 |
|
5 |
export PRODDIR=/gpfs/wizard/flight/production/ |
6 |
|
7 |
export L2=$PRODDIR/level2/ |
8 |
|
9 |
export POSTRR=$PRODDIR/postRawreader/ |
10 |
|
11 |
export LOGDIR=$PRODDIR/logs/ |
12 |
|
13 |
export YODA_DATA=$PRODDIR/level0/ |
14 |
|
15 |
export YODA_LOGS=$PRODDIR/level0/ |
16 |
|
17 |
#export PAM_DBHOST=mysql://srv-g2-01.ts.infn.it/test |
18 |
export PAM_DBHOST=mysql://srv-g2-01.ts.infn.it/pamela |
19 |
|
20 |
export PAM_DBUSER=root |
21 |
|
22 |
export PAM_DBPSW=Calo0%Ts |
23 |
|
24 |
IDRUN=$1 |
25 |
|
26 |
LOG=$LOGDIR/dv.${IDRUN}.log |
27 |
|
28 |
rm -f $LOG; |
29 |
|
30 |
touch $LOG; |
31 |
|
32 |
chmod g+rw $LOG; |
33 |
|
34 |
echo "#####################################" >> $LOG 2>&1; |
35 |
|
36 |
echo " DARTHVADER LOG FOR RUN $IDRUN " >> $LOG 2>&1; |
37 |
|
38 |
echo "#####################################" >> $LOG 2>&1; |
39 |
|
40 |
echo -n " Start date is: " >> $LOG 2>&1; |
41 |
|
42 |
date >> $LOG 2>&1; |
43 |
|
44 |
echo " Job is running on WN: "`hostname` >> $LOG 2>&1; |
45 |
|
46 |
if [ "$PAM_BIN" == "" ]; then |
47 |
|
48 |
echo "ERROR DURING PAM_ENV SETUP!" >> $LOG 2>&1; |
49 |
|
50 |
exit; |
51 |
|
52 |
fi |
53 |
|
54 |
cd $L2 >> $LOG 2>&1; |
55 |
|
56 |
echo " Running in the directory `pwd`" >> $LOG 2>&1; |
57 |
|
58 |
DarthVader -b -c -zerofill +ALL -idRun $IDRUN >> $LOG 2>&1; |
59 |
|
60 |
echo -n " End date is: " >> $LOG 2>&1; |
61 |
|
62 |
date >> $LOG 2>&1; |
63 |
|
64 |
|
65 |
|