Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
docker
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GitHub Mirror
Nextcloud
docker
Commits
df9653a0
Commit
df9653a0
authored
Jan 27, 2023
by
Remi Rampin
Browse files
Options
Downloads
Patches
Plain Diff
Remove old locking logic
Signed-off-by:
Remi Rampin
<
remi@rampin.org
>
parent
7a0aba93
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
docker-entrypoint.sh
+73
-100
73 additions, 100 deletions
docker-entrypoint.sh
with
73 additions
and
100 deletions
docker-entrypoint.sh
+
73
−
100
View file @
df9653a0
...
@@ -69,31 +69,7 @@ do_install_or_upgrade() {
...
@@ -69,31 +69,7 @@ do_install_or_upgrade() {
rsync_options
=
"-rlD"
rsync_options
=
"-rlD"
fi
fi
# 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
lock
=
/var/www/html/nextcloud-init-sync.lock
count
=
0
limit
=
10
if
[
-f
"
$lock
"
]
&&
[
-n
"
${
NEXTCLOUD_INIT_LOCK
+x
}
"
]
;
then
until
[
!
-f
"
$lock
"
]
||
[
"
$count
"
-gt
"
$limit
"
]
do
count
=
$((
count+1
))
wait
=
$((
count
*
10
))
echo
"Another process is initializing Nextcloud. Waiting
$wait
seconds..."
sleep
$wait
done
if
[
"
$count
"
-gt
"
$limit
"
]
;
then
echo
"Timeout while waiting for an ongoing initialization"
exit
1
fi
echo
"The other process is done, assuming complete initialization"
else
# Prevent multiple images syncing simultaneously
touch
$lock
rsync
$rsync_options
--delete
--exclude-from
=
/upgrade.exclude /usr/src/nextcloud/ /var/www/html/
rsync
$rsync_options
--delete
--exclude-from
=
/upgrade.exclude /usr/src/nextcloud/ /var/www/html/
for
dir
in
config data custom_apps themes
;
do
for
dir
in
config data custom_apps themes
;
do
if
[
!
-d
"/var/www/html/
$dir
"
]
||
directory_empty
"/var/www/html/
$dir
"
;
then
if
[
!
-d
"/var/www/html/
$dir
"
]
||
directory_empty
"/var/www/html/
$dir
"
;
then
rsync
$rsync_options
--include
"/
$dir
/"
--exclude
'/*'
/usr/src/nextcloud/ /var/www/html/
rsync
$rsync_options
--include
"/
$dir
/"
--exclude
'/*'
/usr/src/nextcloud/ /var/www/html/
...
@@ -179,11 +155,8 @@ do_install_or_upgrade() {
...
@@ -179,11 +155,8 @@ do_install_or_upgrade() {
fi
fi
# Initialization done, reset lock
rm
$lock
echo
"Initializing finished"
echo
"Initializing finished"
fi
fi
fi
# Update htaccess after init if requested
# Update htaccess after init if requested
if
[
-n
"
${
NEXTCLOUD_INIT_HTACCESS
+x
}
"
]
&&
[
"
$installed_version
"
!=
"0.0.0.0"
]
;
then
if
[
-n
"
${
NEXTCLOUD_INIT_HTACCESS
+x
}
"
]
&&
[
"
$installed_version
"
!=
"0.0.0.0"
]
;
then
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment