mirror of
https://github.com/nextcloud/docker.git
synced 2025-05-03 23:40:54 +02:00
Merge 4df45e7ac3
into 614be28550
This commit is contained in:
commit
10a0a33edf
22 changed files with 215 additions and 22 deletions
|
@ -119,7 +119,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 \
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue