print out install errors

Signed-off-by: Simon L <szaimen@e.mail.de>
This commit is contained in:
Simon L 2023-02-06 18:18:52 +01:00
parent d141471bcd
commit 847b285e41

View file

@ -211,6 +211,7 @@ if ! [ -f "$NEXTCLOUD_DATA_DIR/skip.update" ]; then
touch "$NEXTCLOUD_DATA_DIR/install.failed"
exit 1
fi
max_retries=10
try=0
while [ -z "$(find "$NEXTCLOUD_DATA_DIR/" -maxdepth 1 -mindepth 1 -type d -name "appdata_*")" ] && [ "$try" -lt "$max_retries" ]; do
@ -218,8 +219,10 @@ if ! [ -f "$NEXTCLOUD_DATA_DIR/skip.update" ]; then
try=$((try+1))
sleep 10s
done
if [ "$try" -ge "$max_retries" ]; then
echo "Installation of Nextcloud failed!"
echo "Install errors: $(cat /var/www/html/data/nextcloud.log)"
touch "$NEXTCLOUD_DATA_DIR/install.failed"
exit 1
fi
@ -227,9 +230,6 @@ if ! [ -f "$NEXTCLOUD_DATA_DIR/skip.update" ]; then
# unset admin password
unset ADMIN_PASSWORD
# Post Install logs: For questions like https://help.nextcloud.com/t/nextcloud-aio-error-could-not-get-appdata-folder-after-container-has-already-written-data-in-it/151122/5
echo "Install errors: $(cat /var/www/html/data/nextcloud.log)"
# Apply log settings
echo "Applying default settings..."
mkdir -p /var/www/html/data