mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-12-19 22:16:49 +00:00
also fail the installation if appdata could not get created
Signed-off-by: Simon L <szaimen@e.mail.de>
This commit is contained in:
parent
f62d3ab0f7
commit
e18babbbde
1 changed files with 4 additions and 4 deletions
|
|
@ -204,17 +204,17 @@ if ! [ -f "$NEXTCLOUD_DATA_DIR/skip.update" ]; then
|
||||||
echo "Installing with PostgreSQL database"
|
echo "Installing with PostgreSQL database"
|
||||||
INSTALL_OPTIONS+=(--database pgsql --database-name "$POSTGRES_DB" --database-user "$POSTGRES_USER" --database-pass "$POSTGRES_PASSWORD" --database-host "$POSTGRES_HOST")
|
INSTALL_OPTIONS+=(--database pgsql --database-name "$POSTGRES_DB" --database-user "$POSTGRES_USER" --database-pass "$POSTGRES_PASSWORD" --database-host "$POSTGRES_HOST")
|
||||||
|
|
||||||
echo "starting nextcloud installation"
|
echo "Starting Nextcloud installation..."
|
||||||
max_retries=10
|
max_retries=10
|
||||||
try=0
|
try=0
|
||||||
until php /var/www/html/occ maintenance:install "${INSTALL_OPTIONS[@]}" || [ "$try" -gt "$max_retries" ]
|
until php /var/www/html/occ maintenance:install "${INSTALL_OPTIONS[@]}" || [ "$try" -gt "$max_retries" ]
|
||||||
do
|
do
|
||||||
echo "retrying install..."
|
echo "Retrying install..."
|
||||||
try=$((try+1))
|
try=$((try+1))
|
||||||
sleep 10s
|
sleep 10s
|
||||||
done
|
done
|
||||||
if [ "$try" -gt "$max_retries" ]; then
|
if [ "$try" -gt "$max_retries" ] || [ -z "$(find "$NEXTCLOUD_DATA_DIR/" -maxdepth 1 -mindepth 1 -type d -name "appdata_*")" ]; then
|
||||||
echo "installing of nextcloud failed!"
|
echo "Installation of Nextcloud failed!"
|
||||||
touch "$NEXTCLOUD_DATA_DIR/install.failed"
|
touch "$NEXTCLOUD_DATA_DIR/install.failed"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue