0
0
Fork 0
mirror of https://github.com/nextcloud/docker.git synced 2025-05-03 15:30:55 +02:00
This commit is contained in:
Stephan Brunner 2025-04-19 18:29:33 +00:00 committed by GitHub
commit 10a0a33edf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
22 changed files with 215 additions and 22 deletions

View file

@ -124,7 +124,8 @@ RUN { \
} > "${PHP_INI_DIR}/conf.d/nextcloud.ini"; \
\
mkdir /var/www/data; \
mkdir -p /docker-entrypoint-hooks.d/pre-installation \
mkdir -p /docker-entrypoint-hooks.d/pre-initialization \
/docker-entrypoint-hooks.d/pre-installation \
/docker-entrypoint-hooks.d/post-installation \
/docker-entrypoint-hooks.d/pre-upgrade \
/docker-entrypoint-hooks.d/post-upgrade \

View file

@ -156,6 +156,8 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
flock 9
fi
run_path pre-initialization
installed_version="0.0.0.0"
if [ -f /var/www/html/version.php ]; then
# shellcheck disable=SC2016
@ -169,7 +171,18 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
exit 1
fi
need_initialization=false
if version_greater "$image_version" "$installed_version"; then
need_initialization=true
fi
if [ -f /tmp/nextcloud-force-initialization ]; then
echo Found /tmp/nextcloud-force-initialization, forcing initialization
need_initialization=true
fi
if [ "true" = "$need_initialization" ]; then
echo "Initializing nextcloud $image_version ..."
if [ "$installed_version" != "0.0.0.0" ]; then
if [ "${image_version%%.*}" -gt "$((${installed_version%%.*} + 1))" ]; then
@ -263,7 +276,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
fi
run_path post-installation
fi
fi
fi
# not enough specified to do a fully automated installation
if [ "$install" = false ]; then
@ -284,6 +297,10 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
run_path post-upgrade
fi
if [ -f /tmp/nextcloud-force-initialization ]; then
rm /tmp/nextcloud-force-initialization
fi
echo "Initializing finished"
fi