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
fb63647e
Unverified
Commit
fb63647e
authored
9 months ago
by
Josh
Committed by
GitHub
9 months ago
Browse files
Options
Downloads
Patches
Plain Diff
feat: optional debugging mode for maintenace:instance + rsync
Signed-off-by:
Josh
<
josh.t.richards@gmail.com
>
parent
0be52642
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
+14
-4
14 additions, 4 deletions
docker-entrypoint.sh
with
14 additions
and
4 deletions
docker-entrypoint.sh
+
14
−
4
View file @
fb63647e
#!/bin/sh
set
-eu
if
[
-n
"
${
IMAGE_DEBUG
+x
}
"
]
;
then
echo
"**Image debugging enabled**"
set
-x
...
...
@@ -169,10 +170,14 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
echo
"Upgrading nextcloud from
$installed_version
..."
run_as
'php /var/www/html/occ app:list'
|
sed
-n
"/Enabled:/,/Disabled:/p"
>
/tmp/list_before
fi
rsync_options
=
''
if
[
-n
"
${
IMAGE_DEBUG
+x
}
"
]
;
then
rsync_options
=
'-vv'
fi
if
[
"
$(
id
-u
)
"
=
0
]
;
then
rsync_options
=
"-rlDog --chown
$user
:
$group
"
rsync_options
=
"
$rsync_options
-rlDog --chown
$user
:
$group
"
else
rsync_options
=
"-rlD"
rsync_options
=
"
$rsync_options
-rlD"
fi
rsync
$rsync_options
--delete
--exclude-from
=
/upgrade.exclude /usr/src/nextcloud/ /var/www/html/
...
...
@@ -192,8 +197,12 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
install
=
false
if
[
-n
"
${
NEXTCLOUD_ADMIN_USER
+x
}
"
]
&&
[
-n
"
${
NEXTCLOUD_ADMIN_PASSWORD
+x
}
"
]
;
then
install_options
=
''
if
[
-n
"
${
IMAGE_DEBUG
+x
}
"
]
;
then
install_options
=
'-v '
fi
# shellcheck disable=SC2016
install_options
=
'-n --admin-user "$NEXTCLOUD_ADMIN_USER" --admin-pass "$NEXTCLOUD_ADMIN_PASSWORD"'
install_options
=
$install_options
'-n --admin-user "$NEXTCLOUD_ADMIN_USER" --admin-pass "$NEXTCLOUD_ADMIN_PASSWORD"'
if
[
-n
"
${
NEXTCLOUD_DATA_DIR
+x
}
"
]
;
then
# shellcheck disable=SC2016
install_options
=
$install_options
' --data-dir "$NEXTCLOUD_DATA_DIR"'
...
...
@@ -231,9 +240,10 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
try
=
0
until
[
"
$try
"
-gt
"
$max_retries
"
]
||
run_as
"php /var/www/html/occ maintenance:install
$install_options
"
do
echo
"
Retrying install
..."
echo
"
Nextcloud installation failed; will retry in 10s
..."
try
=
$((
try+1
))
sleep
10s
echo
"Retrying nextcloud install now... (
$try
of
$max_retries
attempts)"
done
if
[
"
$try
"
-gt
"
$max_retries
"
]
;
then
echo
"Installing of nextcloud failed!"
...
...
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