|
|
@ -6,14 +6,14 @@ |
|
|
|
#Module Liste: |
|
|
|
#Module Liste: |
|
|
|
#Hier werden die zu verwendende Module aufgelistet. |
|
|
|
#Hier werden die zu verwendende Module aufgelistet. |
|
|
|
#Nur den Modulnamen:ULR in Kleinbuchstaben, z.B.: |
|
|
|
#Nur den Modulnamen:ULR in Kleinbuchstaben, z.B.: |
|
|
|
#export BI_JOBS_ITEMS="sos:trans_pruefungen_1_sospos sos:trans_pruefungen_2 sos:trans_pruefungen_3 sos gang" |
|
|
|
#export BI_UPDATE_MODULES="sos:trans_pruefungen_1_sospos sos:trans_pruefungen_2 sos:trans_pruefungen_3 sos gang" |
|
|
|
#LOGPFAD=/var/log/tomcat9 |
|
|
|
#LOGPFAD=/var/log/tomcat9 |
|
|
|
#Mailprogramm: |
|
|
|
#Mailprogramm: |
|
|
|
#export MAILPROG=s-nail |
|
|
|
#export MAILPROG=s-nail |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#Beispielaufruf: |
|
|
|
#Beispielaufruf: |
|
|
|
#export BI_JOBS_ITEMS="sos gang" |
|
|
|
#export BI_UPDATE_MODULES="sos gang" |
|
|
|
|
|
|
|
|
|
|
|
# |
|
|
|
# |
|
|
|
#Variablen und Umgebung setzen: |
|
|
|
#Variablen und Umgebung setzen: |
|
|
@ -23,11 +23,11 @@ MASTERLOG=$LOGPFAD/bi_update.log |
|
|
|
#erzeuge Logs Verzeichnis wenn es noch nicht existiert: |
|
|
|
#erzeuge Logs Verzeichnis wenn es noch nicht existiert: |
|
|
|
mkdir -p $LOGPFAD |
|
|
|
mkdir -p $LOGPFAD |
|
|
|
|
|
|
|
|
|
|
|
echo "Start BI-Jobs " >$MASTERLOG |
|
|
|
echo "Start BI-Jobs $BI_UPDATE_MODULES" >$MASTERLOG |
|
|
|
date >>$MASTERLOG |
|
|
|
date >>$MASTERLOG |
|
|
|
|
|
|
|
|
|
|
|
# |
|
|
|
ERROR_FLAG=0 |
|
|
|
|
|
|
|
ERROR_LOG="" |
|
|
|
|
|
|
|
|
|
|
|
executeUpdate() |
|
|
|
executeUpdate() |
|
|
|
{ |
|
|
|
{ |
|
|
@ -42,34 +42,23 @@ executeUpdate() |
|
|
|
echo java -Xmx${MEM} -cp "...CLASSPATH" -Dfile.encoding=UTF-8 de.his.edustore.modules.WebFrontendForModuleUpdate $JOB true '$SUPERX_DIR='$WEBAPP'/WEB-INF/conf/edustore $'$MODUL_UPPER'_LOAD_PFAD='$WEBAPP'/WEB-INF/conf/edustore/db/module/'$MODUL'/rohdaten $'$MODUL_UPPER'_PFAD='$WEBAPP'/WEB-INF/conf/edustore/db/module/'$MODUL >>$JOBLOG 2>&1 |
|
|
|
echo java -Xmx${MEM} -cp "...CLASSPATH" -Dfile.encoding=UTF-8 de.his.edustore.modules.WebFrontendForModuleUpdate $JOB true '$SUPERX_DIR='$WEBAPP'/WEB-INF/conf/edustore $'$MODUL_UPPER'_LOAD_PFAD='$WEBAPP'/WEB-INF/conf/edustore/db/module/'$MODUL'/rohdaten $'$MODUL_UPPER'_PFAD='$WEBAPP'/WEB-INF/conf/edustore/db/module/'$MODUL >>$JOBLOG 2>&1 |
|
|
|
java -Xmx${MEM} -cp "$QIS_CLASSPATH" -Dfile.encoding=UTF-8 de.his.edustore.modules.WebFrontendForModuleUpdate $JOB true '$SUPERX_DIR='$WEBAPP'/WEB-INF/conf/edustore $'$MODUL_UPPER'_LOAD_PFAD='$WEBAPP'/WEB-INF/conf/edustore/db/module/'$MODUL'/rohdaten $'$MODUL_UPPER'_PFAD='$WEBAPP'/WEB-INF/conf/edustore/db/module/'$MODUL >>$JOBLOG 2>&1 |
|
|
|
java -Xmx${MEM} -cp "$QIS_CLASSPATH" -Dfile.encoding=UTF-8 de.his.edustore.modules.WebFrontendForModuleUpdate $JOB true '$SUPERX_DIR='$WEBAPP'/WEB-INF/conf/edustore $'$MODUL_UPPER'_LOAD_PFAD='$WEBAPP'/WEB-INF/conf/edustore/db/module/'$MODUL'/rohdaten $'$MODUL_UPPER'_PFAD='$WEBAPP'/WEB-INF/conf/edustore/db/module/'$MODUL >>$JOBLOG 2>&1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
RETURN_CODE=$? |
|
|
|
RETURN_CODE=$? |
|
|
|
echo "End Job $JOB with RETURN_CODE $RETURN_CODE" >>$MYMASTERLOG |
|
|
|
echo "End Job $JOB with RETURN_CODE $RETURN_CODE" >>$MYMASTERLOG |
|
|
|
date >>$MYMASTERLOG |
|
|
|
date >>$MYMASTERLOG |
|
|
|
if [ $RETURN_CODE -eq 0 ] |
|
|
|
if [ $RETURN_CODE -eq 0 ] |
|
|
|
then |
|
|
|
then |
|
|
|
echo "End Job $JOB erfolgreich" >>$MYMASTERLOG |
|
|
|
echo "End Job $JOB erfolgreich" >>$MYMASTERLOG |
|
|
|
if [ "$MAILPROG" != "" ] |
|
|
|
|
|
|
|
then |
|
|
|
|
|
|
|
$MAILPROG -s "Job $JOB ok" $LOGMAIL <$MYMASTERLOG |
|
|
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
else |
|
|
|
else |
|
|
|
echo "Job $JOB Fehler" >> $MYMASTERLOG |
|
|
|
echo "Job $JOB Fehler" >> $MYMASTERLOG |
|
|
|
if [ "$MAILPROG" != "" ] |
|
|
|
ERROR_FLAG=1 |
|
|
|
then |
|
|
|
ERROR_LOG+=" -a $JOBLOG" |
|
|
|
echo "sending logmail to $LOGMAIL" |
|
|
|
|
|
|
|
$MAILPROG -s "BI Job $JOB Fehler" -a $JOBLOG $LOGMAIL <$MYMASTERLOG |
|
|
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fi |
|
|
|
fi |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
#Updates: |
|
|
|
#Updates: |
|
|
|
|
|
|
|
|
|
|
|
echo -e "######################################\n\n" >>$MASTERLOG |
|
|
|
echo -e "######################################\n\n" >>$MASTERLOG |
|
|
|
for JOB_SINGLE in ${BI_JOBS_ITEMS[@]} ; do |
|
|
|
for JOB_SINGLE in ${BI_UPDATE_MODULES[@]} ; do |
|
|
|
echo "start bi_"$JOB_SINGLE"_update `date`" >>$MASTERLOG |
|
|
|
echo "start bi_"$JOB_SINGLE"_update `date`" >>$MASTERLOG |
|
|
|
executeUpdate $JOB_SINGLE $LOGPFAD $MASTERLOG |
|
|
|
executeUpdate $JOB_SINGLE $LOGPFAD $MASTERLOG |
|
|
|
echo "ende bi_"$JOB_SINGLE"_update `date`" >>$MASTERLOG |
|
|
|
echo "ende bi_"$JOB_SINGLE"_update `date`" >>$MASTERLOG |
|
|
@ -78,4 +67,18 @@ echo -e "\n\n######################################" >>$MASTERLOG |
|
|
|
echo -e "-- Ende BI update `date`\n\n" >>$MASTERLOG |
|
|
|
echo -e "-- Ende BI update `date`\n\n" >>$MASTERLOG |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if [ $ERROR_FLAG -eq 0 ] |
|
|
|
|
|
|
|
then |
|
|
|
|
|
|
|
if [ "$MAILPROG" != "" ] |
|
|
|
|
|
|
|
then |
|
|
|
|
|
|
|
$MAILPROG -s "BI Job $JOB Erfolgreich" $LOGMAIL <$MYMASTERLOG |
|
|
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
if [ "$MAILPROG" != "" ] |
|
|
|
|
|
|
|
then |
|
|
|
|
|
|
|
echo "sending logmail to $LOGMAIL" |
|
|
|
|
|
|
|
$MAILPROG -s "BI Job $JOB Fehler" $ERROR_LOG $LOGMAIL <$MYMASTERLOG |
|
|
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fi |
|
|
|