0
0
Fork 0
mirror of https://github.com/nextcloud/docker.git synced 2025-05-03 07:30:53 +02:00

Add NEXTCLOUD_INIT_LOCK to enable shared html volume update

Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
This commit is contained in:
John Molakvoæ 2022-05-31 09:39:13 +02:00
parent d11d42bb20
commit 83d5e72596
No known key found for this signature in database
GPG key ID: 60C25B8C072916CF
2 changed files with 7 additions and 2 deletions

View file

@ -103,12 +103,13 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
fi
# If another process is syncing the html folder, wait for
# it to be done, then escape initalization
# it to be done, then escape initalization.
# You need to define the NEXTCLOUD_INIT_LOCK environment variable
lock=/var/www/html/nextcloud-init-sync.lock
count=0
limit=10
if [ -f "$lock" ]; then
if [ -f "$lock" ] && [ -n "${NEXTCLOUD_INIT_LOCK+x}" ]; then
until [ ! -f "$lock" ] || [ "$count" -gt "$limit" ]
do
count=$((count+1))