mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-12-19 22:16:49 +00:00
Merge pull request #6743 from nextcloud/enh/noid/add-safeguard-to-fts
nextcloud-entrypoint: do not wait indefinitely if FTS is not reachable
This commit is contained in:
commit
d0ba9278f9
1 changed files with 44 additions and 35 deletions
|
|
@ -828,10 +828,18 @@ fi
|
|||
|
||||
# Fulltextsearch
|
||||
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..."
|
||||
count=$((count+5))
|
||||
sleep 5
|
||||
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
|
||||
php /var/www/html/occ app:install fulltextsearch
|
||||
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."
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
else
|
||||
if [ "$REMOVE_DISABLED_APPS" = yes ]; then
|
||||
if [ -d "/var/www/html/custom_apps/fulltextsearch" ]; then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue