Merge pull request #1533 from nextcloud/enh/noid/dont-start-nextcloud-if-install-failed

Don't start the Nextcloud container if the installation failed
This commit is contained in:
Simon L 2022-12-16 18:12:41 +01:00 committed by GitHub
commit 163f6ea10a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -79,6 +79,14 @@ if [ -f "$NEXTCLOUD_DATA_DIR/update.failed" ]; then
exit 1
fi
# Do not start the container if the install failed
if [ -f "$NEXTCLOUD_DATA_DIR/install.failed" ]; then
echo "The initial Nextcloud installation failed."
echo "Please reset AIO properly and try again. For further clues what went wrong, check the logs above."
echo "See https://github.com/nextcloud/all-in-one#how-to-properly-reset-the-instance"
exit 1
fi
# Skip any update if Nextcloud was just restored
if ! [ -f "$NEXTCLOUD_DATA_DIR/skip.update" ]; then
if version_greater "$image_version" "$installed_version"; then
@ -203,6 +211,7 @@ if ! [ -f "$NEXTCLOUD_DATA_DIR/skip.update" ]; then
done
if [ "$try" -gt "$max_retries" ]; then
echo "installing of nextcloud failed!"
touch "$NEXTCLOUD_DATA_DIR/install.failed"
exit 1
fi