From 0368ce7ef9bdd062da28a88c268831a879e1c393 Mon Sep 17 00:00:00 2001 From: Simon L Date: Sat, 3 Jun 2023 14:00:40 +0200 Subject: [PATCH 1/2] Make sure to disable apps that could not get enabled after an update Signed-off-by: Simon L --- Containers/nextcloud/entrypoint.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/Containers/nextcloud/entrypoint.sh b/Containers/nextcloud/entrypoint.sh index 9887629e..809e3593 100644 --- a/Containers/nextcloud/entrypoint.sh +++ b/Containers/nextcloud/entrypoint.sh @@ -362,6 +362,7 @@ DATADIR_PERMISSION_CONF if [ "${APPSTORAGE[$app]}" != "no" ]; then echo "Enabling $app..." if ! php /var/www/html/occ app:enable "$app" >/dev/null; then + php /var/www/html/occ app:disable "$app" >/dev/null echo "The $app app could not get enabled. Probably because it is not compatible with the new Nextcloud version." if [ "$app" = apporder ]; then CUSTOM_HINT="The apporder app was deprecated. A possible replacement is the side_menu app, aka 'Custom menu'." From a05c2bffcddebfd4f208b5ec1d9c8486cc0f8675 Mon Sep 17 00:00:00 2001 From: Simon L Date: Tue, 6 Jun 2023 09:44:11 +0200 Subject: [PATCH 2/2] make it save Signed-off-by: Simon L --- Containers/nextcloud/entrypoint.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Containers/nextcloud/entrypoint.sh b/Containers/nextcloud/entrypoint.sh index 809e3593..a5729696 100644 --- a/Containers/nextcloud/entrypoint.sh +++ b/Containers/nextcloud/entrypoint.sh @@ -363,6 +363,10 @@ DATADIR_PERMISSION_CONF echo "Enabling $app..." if ! php /var/www/html/occ app:enable "$app" >/dev/null; then php /var/www/html/occ app:disable "$app" >/dev/null + if ! php /var/www/html/occ -V &>/dev/null; then + rm -r "/var/www/html/custom_apps/$app" + php /var/www/html/occ maintenance:mode --off + fi echo "The $app app could not get enabled. Probably because it is not compatible with the new Nextcloud version." if [ "$app" = apporder ]; then CUSTOM_HINT="The apporder app was deprecated. A possible replacement is the side_menu app, aka 'Custom menu'."