mirror of
https://github.com/nextcloud/docker.git
synced 2025-05-03 07:30:53 +02:00
Remove NEXTCLOUD_INIT_LOCK
Signed-off-by: Remi Rampin <remi@rampin.org>
This commit is contained in:
parent
295cdf7fb7
commit
8aabc4b3ea
2 changed files with 8 additions and 17 deletions
|
@ -222,19 +222,14 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
|
|||
|
||||
# If another process is syncing the html folder, wait for
|
||||
# it to be done, then escape initalization.
|
||||
# You need to define the NEXTCLOUD_INIT_LOCK environment variable
|
||||
if [ -n "${NEXTCLOUD_INIT_LOCK+x}" ]; then
|
||||
(
|
||||
if ! flock -n 9; then
|
||||
# If we couldn't get it immediately, show a message, then wait for real
|
||||
echo "Another process is initializing Nextcloud. Waiting..."
|
||||
flock 9
|
||||
fi
|
||||
do_install_or_upgrade
|
||||
) 9> /var/www/html/nextcloud-init-sync.lock
|
||||
else
|
||||
(
|
||||
if ! flock -n 9; then
|
||||
# If we couldn't get it immediately, show a message, then wait for real
|
||||
echo "Another process is initializing Nextcloud. Waiting..."
|
||||
flock 9
|
||||
fi
|
||||
do_install_or_upgrade
|
||||
fi
|
||||
) 9> /var/www/html/nextcloud-init-sync.lock
|
||||
fi
|
||||
|
||||
exec "$@"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue