Browse Source

fix: [nextcloud] try to patch onlyoffice when other error messages are caught

It seems that ``SQLSTATE`` is not displayed on all version of nextcloud. Some
version use other error messages.

Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
cups_service_alpha
Valentin Lab 2 years ago
parent
commit
047ddde8ba
  1. 5
      nextcloud/actions/upgrade

5
nextcloud/actions/upgrade

@ -219,8 +219,9 @@ for image_version in "${upgrade_path[@]}"; do
## XXXvlab: this comes from and should move to onlyoffice charm in ## XXXvlab: this comes from and should move to onlyoffice charm in
## some way. ## some way.
if grep "Update app onlyoffice" "$MIGRATION_TMPDIR/migration.log" >/dev/null 2>&1 &&
grep "SQLSTATE" "$MIGRATION_TMPDIR/migration.log" >/dev/null 2>&1; then
if grep "Update app onlyoffice" "$MIGRATION_TMPDIR/migration.log" >/dev/null 2>&1 && (
grep "SQLSTATE" "$MIGRATION_TMPDIR/migration.log" >/dev/null 2>&1 ||
grep "^Database error when running migration latest for app onlyoffice" "$MIGRATION_TMPDIR/migration.log" >/dev/null 2>&1 ); then
if [ -e "$DATASTORE"/"$SERVICE_NAME/var/www/html/custom_apps/onlyoffice/lib/Migration/Version070400Date20220607111111.php" ]; then if [ -e "$DATASTORE"/"$SERVICE_NAME/var/www/html/custom_apps/onlyoffice/lib/Migration/Version070400Date20220607111111.php" ]; then
patch="$CHARM_PATH/../onlyoffice/src/patch/00-onlyoffice-nextcloud.patch" patch="$CHARM_PATH/../onlyoffice/src/patch/00-onlyoffice-nextcloud.patch"

Loading…
Cancel
Save