|
|
@ -27,8 +27,10 @@ MASTERLOG=$LOGPFAD/bi_upgrade.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-Upgrades " >$MASTERLOG |
|
|
|
ERROR_FLAG=0 |
|
|
|
date >>$MASTERLOG |
|
|
|
ERROR_LOG="" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# |
|
|
|
# |
|
|
|
|
|
|
|
|
|
|
@ -40,7 +42,7 @@ executeUpgrade() |
|
|
|
MYMASTERLOG=$3 |
|
|
|
MYMASTERLOG=$3 |
|
|
|
MODUL_UPPER=`echo $MODUL | tr [a-z] [A-Z]` |
|
|
|
MODUL_UPPER=`echo $MODUL | tr [a-z] [A-Z]` |
|
|
|
MODULLOG=$LOGPFAD/"$MODUL_UPPER"_upgrade.log |
|
|
|
MODULLOG=$LOGPFAD/"$MODUL_UPPER"_upgrade.log |
|
|
|
echo "Start MODUL $MODUL_UPPER " >>$MYMASTERLOG |
|
|
|
echo "--- Start Upgrade für: $MODUL_UPPER ---" >>$MYMASTERLOG |
|
|
|
date >>$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 |
|
|
|
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 |
|
|
|
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() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
RETURN_CODE=$? |
|
|
|
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 |
|
|
|
date >>$MYMASTERLOG |
|
|
|
if [ $RETURN_CODE -eq 0 ] |
|
|
|
if [ $RETURN_CODE -eq 0 ] |
|
|
|
then |
|
|
|
then |
|
|
|
echo "End MODUL $MODUL erfolgreich" >>$MYMASTERLOG |
|
|
|
echo "--- Ende Upgrade von $MODUL_UPPER: erfolgreich ---" >>$MYMASTERLOG |
|
|
|
if [ "$MAILPROG" != "" ] |
|
|
|
|
|
|
|
then |
|
|
|
|
|
|
|
$MAILPROG -s "MODUL $MODUL_UPPER ok" $LOGMAIL <$MYMASTERLOG |
|
|
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
else |
|
|
|
else |
|
|
|
echo "MODUL $MODUL_UPPER Fehler" >> $MYMASTERLOG |
|
|
|
echo ">>>> Achtung: Das Update des Modules $MODUL_UPPER wurde mit einem Fehler beendet! <<<<" >> $MYMASTERLOG |
|
|
|
if [ "$MAILPROG" != "" ] |
|
|
|
echo "--- Ende des Upgrades vom Modul $MODUL_UPPER mit Fehler ---" >>$MYMASTERLOG |
|
|
|
then |
|
|
|
ERROR_FLAG=1 |
|
|
|
echo "sending logmail to $LOGMAIL" |
|
|
|
|
|
|
|
$MAILPROG -s "BI MODUL $MODUL_UPPER Fehler" -a $MODULLOG $LOGMAIL <$MYMASTERLOG |
|
|
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fi |
|
|
|
fi |
|
|
|
|
|
|
|
ERROR_LOG+=" $MAIL_APPEND $JOBLOG" |
|
|
|
|
|
|
|
echo "" >>$MYMASTERLOG |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
#Upgrades: |
|
|
|
#Upgrades: |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
echo "Starte BI-Upgrades für die Module: $BI_UPGRADE_MODULES" >$MASTERLOG |
|
|
|
|
|
|
|
date >>$MASTERLOG |
|
|
|
echo -e "######################################\n\n" >>$MASTERLOG |
|
|
|
echo -e "######################################\n\n" >>$MASTERLOG |
|
|
|
for MODULE_SINGLE in ${BI_UPGRADE_MODULES[@]} ; do |
|
|
|
for MODULE_SINGLE in ${BI_UPGRADE_MODULES[@]} ; do |
|
|
|
echo "start bi_"$MODULE_SINGLE"_upgrade `date`" >>$MASTERLOG |
|
|
|
|
|
|
|
executeUpgrade $MODULE_SINGLE $LOGPFAD $MASTERLOG |
|
|
|
executeUpgrade $MODULE_SINGLE $LOGPFAD $MASTERLOG |
|
|
|
echo "ende bi_"$MODULE_SINGLE"_upgrade `date`" >>$MASTERLOG |
|
|
|
|
|
|
|
done |
|
|
|
done |
|
|
|
echo -e "\n\n######################################" >>$MASTERLOG |
|
|
|
echo -e "\n\n######################################" >>$MASTERLOG |
|
|
|
echo -e "-- Ende BI upgrade `date`\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 |
|
|
|
|
|
|
|
|
|
|
|