From f47f9f9c99917a4377c5aeeebde967ef288870e6 Mon Sep 17 00:00:00 2001 From: Yuxiang Zhu Date: Thu, 29 Jun 2017 11:23:46 +0800 Subject: [PATCH] Ensure config/apps.config.php get copied PR #115 breaks the logic that config/apps.config.php get copied after custom_apps: https://github.com/nextcloud/docker/pull/115#discussion_r124702790. This patch is going to copy that file if it doesn't exist. --- 10.0/apache/docker-entrypoint.sh | 4 ++++ 10.0/fpm/docker-entrypoint.sh | 4 ++++ 11.0/apache/docker-entrypoint.sh | 4 ++++ 11.0/fpm/docker-entrypoint.sh | 4 ++++ 12.0/apache/docker-entrypoint.sh | 4 ++++ 12.0/fpm/docker-entrypoint.sh | 4 ++++ docker-entrypoint.sh | 4 ++++ 7 files changed, 28 insertions(+) diff --git a/10.0/apache/docker-entrypoint.sh b/10.0/apache/docker-entrypoint.sh index 1ffa8409..31d3e6ce 100755 --- a/10.0/apache/docker-entrypoint.sh +++ b/10.0/apache/docker-entrypoint.sh @@ -35,6 +35,10 @@ if version_greater "$image_version" "$installed_version"; then fi done + if [ ! -f /var/www/html/config/apps.config.php ]; then + cp -a /usr/src/nextcloud/config/apps.config.php /var/www/html/config/apps.config.php + fi + if [ "$installed_version" != "0.0.0~unknown" ]; then su - www-data -s /bin/bash -c 'php /var/www/html/occ upgrade --no-app-disable' diff --git a/10.0/fpm/docker-entrypoint.sh b/10.0/fpm/docker-entrypoint.sh index 1ffa8409..31d3e6ce 100755 --- a/10.0/fpm/docker-entrypoint.sh +++ b/10.0/fpm/docker-entrypoint.sh @@ -35,6 +35,10 @@ if version_greater "$image_version" "$installed_version"; then fi done + if [ ! -f /var/www/html/config/apps.config.php ]; then + cp -a /usr/src/nextcloud/config/apps.config.php /var/www/html/config/apps.config.php + fi + if [ "$installed_version" != "0.0.0~unknown" ]; then su - www-data -s /bin/bash -c 'php /var/www/html/occ upgrade --no-app-disable' diff --git a/11.0/apache/docker-entrypoint.sh b/11.0/apache/docker-entrypoint.sh index 1ffa8409..31d3e6ce 100755 --- a/11.0/apache/docker-entrypoint.sh +++ b/11.0/apache/docker-entrypoint.sh @@ -35,6 +35,10 @@ if version_greater "$image_version" "$installed_version"; then fi done + if [ ! -f /var/www/html/config/apps.config.php ]; then + cp -a /usr/src/nextcloud/config/apps.config.php /var/www/html/config/apps.config.php + fi + if [ "$installed_version" != "0.0.0~unknown" ]; then su - www-data -s /bin/bash -c 'php /var/www/html/occ upgrade --no-app-disable' diff --git a/11.0/fpm/docker-entrypoint.sh b/11.0/fpm/docker-entrypoint.sh index 1ffa8409..31d3e6ce 100755 --- a/11.0/fpm/docker-entrypoint.sh +++ b/11.0/fpm/docker-entrypoint.sh @@ -35,6 +35,10 @@ if version_greater "$image_version" "$installed_version"; then fi done + if [ ! -f /var/www/html/config/apps.config.php ]; then + cp -a /usr/src/nextcloud/config/apps.config.php /var/www/html/config/apps.config.php + fi + if [ "$installed_version" != "0.0.0~unknown" ]; then su - www-data -s /bin/bash -c 'php /var/www/html/occ upgrade --no-app-disable' diff --git a/12.0/apache/docker-entrypoint.sh b/12.0/apache/docker-entrypoint.sh index 1ffa8409..31d3e6ce 100755 --- a/12.0/apache/docker-entrypoint.sh +++ b/12.0/apache/docker-entrypoint.sh @@ -35,6 +35,10 @@ if version_greater "$image_version" "$installed_version"; then fi done + if [ ! -f /var/www/html/config/apps.config.php ]; then + cp -a /usr/src/nextcloud/config/apps.config.php /var/www/html/config/apps.config.php + fi + if [ "$installed_version" != "0.0.0~unknown" ]; then su - www-data -s /bin/bash -c 'php /var/www/html/occ upgrade --no-app-disable' diff --git a/12.0/fpm/docker-entrypoint.sh b/12.0/fpm/docker-entrypoint.sh index 1ffa8409..31d3e6ce 100755 --- a/12.0/fpm/docker-entrypoint.sh +++ b/12.0/fpm/docker-entrypoint.sh @@ -35,6 +35,10 @@ if version_greater "$image_version" "$installed_version"; then fi done + if [ ! -f /var/www/html/config/apps.config.php ]; then + cp -a /usr/src/nextcloud/config/apps.config.php /var/www/html/config/apps.config.php + fi + if [ "$installed_version" != "0.0.0~unknown" ]; then su - www-data -s /bin/bash -c 'php /var/www/html/occ upgrade --no-app-disable' diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 1ffa8409..31d3e6ce 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -35,6 +35,10 @@ if version_greater "$image_version" "$installed_version"; then fi done + if [ ! -f /var/www/html/config/apps.config.php ]; then + cp -a /usr/src/nextcloud/config/apps.config.php /var/www/html/config/apps.config.php + fi + if [ "$installed_version" != "0.0.0~unknown" ]; then su - www-data -s /bin/bash -c 'php /var/www/html/occ upgrade --no-app-disable'