nextcloud-entrypoint: do not wait indefinitely if FTS is not reachable

Signed-off-by: Simon L. <szaimen@e.mail.de>
This commit is contained in:
Simon L. 2025-08-13 14:05:31 +02:00
parent 6e983c6a17
commit 4f07118a37

View file

@ -828,10 +828,18 @@ fi
# Fulltextsearch # Fulltextsearch
if [ "$FULLTEXTSEARCH_ENABLED" = 'yes' ]; then if [ "$FULLTEXTSEARCH_ENABLED" = 'yes' ]; then
while ! nc -z "$FULLTEXTSEARCH_HOST" "$FULLTEXTSEARCH_PORT"; do count=0
while ! nc -z "$FULLTEXTSEARCH_HOST" "$FULLTEXTSEARCH_PORT" && [ "$count" -lt 90 ]; do
echo "waiting for Fulltextsearch to become available..." echo "waiting for Fulltextsearch to become available..."
count=$((count+5))
sleep 5 sleep 5
done done
if [ "$count" -ge 90 ]; then
echo "Fulltextsearch did not start in time. Skipping initialization and disabling fulltextsearch apps."
php /var/www/html/occ app:disable fulltextsearch
php /var/www/html/occ app:disable fulltextsearch_elasticsearch
php /var/www/html/occ app:disable files_fulltextsearch
else
if ! [ -d "/var/www/html/custom_apps/fulltextsearch" ]; then if ! [ -d "/var/www/html/custom_apps/fulltextsearch" ]; then
php /var/www/html/occ app:install fulltextsearch php /var/www/html/occ app:install fulltextsearch
elif [ "$(php /var/www/html/occ config:app:get fulltextsearch enabled)" != "yes" ]; then elif [ "$(php /var/www/html/occ config:app:get fulltextsearch enabled)" != "yes" ]; then
@ -869,6 +877,7 @@ if [ "$FULLTEXTSEARCH_ENABLED" = 'yes' ]; then
echo "Feel free to follow https://github.com/nextcloud/all-in-one/discussions/1709 if you want to skip the indexing in the future." echo "Feel free to follow https://github.com/nextcloud/all-in-one/discussions/1709 if you want to skip the indexing in the future."
fi fi
fi fi
fi
else else
if [ "$REMOVE_DISABLED_APPS" = yes ]; then if [ "$REMOVE_DISABLED_APPS" = yes ]; then
if [ -d "/var/www/html/custom_apps/fulltextsearch" ]; then if [ -d "/var/www/html/custom_apps/fulltextsearch" ]; then