|
|
|
@ -27,8 +27,10 @@ MASTERLOG=$LOGPFAD/bi_upgrade.log
@@ -27,8 +27,10 @@ MASTERLOG=$LOGPFAD/bi_upgrade.log
|
|
|
|
|
#erzeuge Logs Verzeichnis wenn es noch nicht existiert: |
|
|
|
|
mkdir -p $LOGPFAD |
|
|
|
|
|
|
|
|
|
echo "Start BI-Upgrades " >$MASTERLOG |
|
|
|
|
date >>$MASTERLOG |
|
|
|
|
ERROR_FLAG=0 |
|
|
|
|
ERROR_LOG="" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# |
|
|
|
|
|
|
|
|
@ -40,7 +42,7 @@ executeUpgrade()
@@ -40,7 +42,7 @@ executeUpgrade()
|
|
|
|
|
MYMASTERLOG=$3 |
|
|
|
|
MODUL_UPPER=`echo $MODUL | tr [a-z] [A-Z]` |
|
|
|
|
MODULLOG=$LOGPFAD/"$MODUL_UPPER"_upgrade.log |
|
|
|
|
echo "Start MODUL $MODUL_UPPER " >>$MYMASTERLOG |
|
|
|
|
echo "--- Start Upgrade für: $MODUL_UPPER ---" >>$MYMASTERLOG |
|
|
|
|
date >>$MYMASTERLOG |
|
|
|
|
echo Executing java -Xmx${MEM} -cp "...QIS_CLASSPATH" -Dfile.encoding=UTF-8 de.his.edustore.modules.WebFrontendForModuleInstall $MODUL upgrade '$SUPERX_DIR='$WEBAPP'/WEB-INF/conf/edustore $'$MODUL_UPPER'_PFAD='$WEBAPP'/WEB-INF/conf/edustore/db/module/'$MODUL >>$MODULLOG 2>&1 |
|
|
|
|
java -Xmx${MEM} -cp "$QIS_CLASSPATH" -Dfile.encoding=UTF-8 de.his.edustore.modules.WebFrontendForModuleInstall $MODUL upgrade '$SUPERX_DIR='$WEBAPP'/WEB-INF/conf/edustore $'$MODUL_UPPER'_PFAD='$WEBAPP'/WEB-INF/conf/edustore/db/module/'$MODUL >>$MODULLOG 2>&1 |
|
|
|
@ -48,37 +50,47 @@ executeUpgrade()
@@ -48,37 +50,47 @@ executeUpgrade()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
RETURN_CODE=$? |
|
|
|
|
echo "End Upgrade $MODUL with RETURN_CODE $RETURN_CODE" >>$MYMASTERLOG |
|
|
|
|
echo "Returncode von dem Job des Moduls $MODUL_UPPER ist: $RETURN_CODE" >>$MYMASTERLOG |
|
|
|
|
date >>$MYMASTERLOG |
|
|
|
|
if [ $RETURN_CODE -eq 0 ] |
|
|
|
|
then |
|
|
|
|
echo "End MODUL $MODUL erfolgreich" >>$MYMASTERLOG |
|
|
|
|
if [ "$MAILPROG" != "" ] |
|
|
|
|
then |
|
|
|
|
$MAILPROG -s "MODUL $MODUL_UPPER ok" $LOGMAIL <$MYMASTERLOG |
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
echo "--- Ende Upgrade von $MODUL_UPPER: erfolgreich ---" >>$MYMASTERLOG |
|
|
|
|
else |
|
|
|
|
echo "MODUL $MODUL_UPPER Fehler" >> $MYMASTERLOG |
|
|
|
|
if [ "$MAILPROG" != "" ] |
|
|
|
|
then |
|
|
|
|
echo "sending logmail to $LOGMAIL" |
|
|
|
|
$MAILPROG -s "BI MODUL $MODUL_UPPER Fehler" -a $MODULLOG $LOGMAIL <$MYMASTERLOG |
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
echo ">>>> Achtung: Das Update des Modules $MODUL_UPPER wurde mit einem Fehler beendet! <<<<" >> $MYMASTERLOG |
|
|
|
|
echo "--- Ende des Upgrades vom Modul $MODUL_UPPER mit Fehler ---" >>$MYMASTERLOG |
|
|
|
|
ERROR_FLAG=1 |
|
|
|
|
fi |
|
|
|
|
ERROR_LOG+=" $MAIL_APPEND $JOBLOG" |
|
|
|
|
echo "" >>$MYMASTERLOG |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
#Upgrades: |
|
|
|
|
|
|
|
|
|
echo "Starte BI-Upgrades für die Module: $BI_UPGRADE_MODULES" >$MASTERLOG |
|
|
|
|
date >>$MASTERLOG |
|
|
|
|
echo -e "######################################\n\n" >>$MASTERLOG |
|
|
|
|
for MODULE_SINGLE in ${BI_UPGRADE_MODULES[@]} ; do |
|
|
|
|
echo "start bi_"$MODULE_SINGLE"_upgrade `date`" >>$MASTERLOG |
|
|
|
|
executeUpgrade $MODULE_SINGLE $LOGPFAD $MASTERLOG |
|
|
|
|
echo "ende bi_"$MODULE_SINGLE"_upgrade `date`" >>$MASTERLOG |
|
|
|
|
done |
|
|
|
|
echo -e "\n\n######################################" >>$MASTERLOG |
|
|
|
|
echo -e "-- Ende BI upgrade `date`\n\n" >>$MASTERLOG |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Mailversand |
|
|
|
|
if [ $ERROR_FLAG -eq 0 ] |
|
|
|
|
then |
|
|
|
|
if [ "$MAILPROG" != "" ] |
|
|
|
|
then |
|
|
|
|
$MAILPROG -s "$MAIL_BETREFF_UPGRADE$MAIL_BETREFF_SUFFIX_ERFOLGREICH" $LOGMAIL <$MYMASTERLOG |
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
else |
|
|
|
|
if [ "$MAILPROG" != "" ] |
|
|
|
|
then |
|
|
|
|
echo "Sende Logmail an $LOGMAIL" |
|
|
|
|
$MAILPROG -s "$MAIL_BETREFF_UPGRADE$MAIL_BETREFF_SUFFIX_FEHLER" $ERROR_LOG $LOGMAIL <$MYMASTERLOG |
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|