Skip to content

Commit c0b67e7

Browse files
committed
fix: incomplete setup don't stop a new setup
If have some error during start environment and the config/config.php is empty, the start will get a loop as the follow log: nextcloud-1 | ⌛ Waiting for database 🐬mysql nextcloud-1 | ✅ Database 🐬mysql ready nextcloud-1 | Nextcloud is not installed - only a limited number of commands are available nextcloud-1 | ❌ Nextcloud is not installed. Skipping startup tasks and stopping container. nextcloud-1 exited with code 1 nextcloud-1 | ⌛ Waiting for database 🐬mysql nextcloud-1 | ✅ Database 🐬mysql ready nextcloud-1 | Nextcloud is not installed - only a limited number of commands are available nextcloud-1 | ❌ Nextcloud is not installed. Skipping startup tasks and stopping container. nextcloud-1 exited with code 1 nextcloud-1 | ⌛ Waiting for database 🐬mysql nextcloud-1 | ✅ Database 🐬mysql ready nextcloud-1 | Nextcloud is not installed - only a limited number of commands are available nextcloud-1 | ❌ Nextcloud is not installed. Skipping startup tasks and stopping container. nextcloud-1 exited with code 1 nextcloud-1 | ⌛ Waiting for database 🐬mysql nextcloud-1 | ✅ Database 🐬mysql ready nextcloud-1 | Nextcloud is not installed - only a limited number of commands are available nextcloud-1 | ❌ Nextcloud is not installed. Skipping startup tasks and stopping container. nextcloud-1 exited with code 1 nextcloud-1 | ⌛ Waiting for database 🐬mysql nextcloud-1 | ✅ Database 🐬mysql ready nextcloud-1 | Nextcloud is not installed - only a limited number of commands are available nextcloud-1 | ❌ Nextcloud is not installed. Skipping startup tasks and stopping container. nextcloud-1 exited with code 1 nextcloud-1 | ⌛ Waiting for database 🐬mysql nextcloud-1 | ✅ Database 🐬mysql ready nextcloud-1 | Nextcloud is not installed - only a limited number of commands are available nextcloud-1 | ❌ Nextcloud is not installed. Skipping startup tasks and stopping container. nextcloud-1 exited with code 1 nextcloud-1 | ⌛ Waiting for database 🐬mysql nextcloud-1 | ✅ Database 🐬mysql ready nextcloud-1 | Nextcloud is not installed - only a limited number of commands are available nextcloud-1 | ❌ Nextcloud is not installed. Skipping startup tasks and stopping container. nextcloud-1 exited with code 1 Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
1 parent 56660f4 commit c0b67e7

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

.docker/scripts/nextcloud-entrypoint.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@ php /var/www/scripts/wait-for-db.php
2424

2525
install_cmd_status=0
2626

27+
# An empty or incomplete config.php (interrupted install) must not block a new installation
28+
if [[ -f "config/config.php" ]] && ! grep -qE "'installed'[[:space:]]*=>[[:space:]]*true" config/config.php; then
29+
echo "⚠️ Found an empty or incomplete config/config.php. Removing it to install from scratch."
30+
rm -f config/config.php
31+
fi
32+
2733
# Set configurations, if needed
2834
if [[ ! -f "config/config.php" && ${AUTOINSTALL} -eq 1 ]]; then
2935
echo "⌛️ Starting installation ..."

0 commit comments

Comments
 (0)