mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-12-19 22:16:49 +00:00
nextcloud-entrypoint: don't wait forever for onlyoffice to become available
Signed-off-by: Simon L. <szaimen@e.mail.de>
This commit is contained in:
parent
7560694535
commit
c0dfba5272
1 changed files with 28 additions and 23 deletions
|
|
@ -769,12 +769,16 @@ if [ "$ONLYOFFICE_ENABLED" = 'yes' ]; then
|
|||
ONLYOFFICE_PORT=443
|
||||
fi
|
||||
|
||||
# Wait for OnlyOffice to become available
|
||||
while ! nc -z "$ONLYOFFICE_HOST" "$ONLYOFFICE_PORT"; do
|
||||
count=0
|
||||
while ! nc -z "$ONLYOFFICE_HOST" "$ONLYOFFICE_PORT" && [ "$count" -lt 90 ]; do
|
||||
echo "Waiting for OnlyOffice to become available..."
|
||||
count=$((count+5))
|
||||
sleep 5
|
||||
done
|
||||
|
||||
if [ "$count" -ge 90 ]; then
|
||||
bash /notify.sh "Onlyoffice did not start in time!" "Skipping initialization and disabling onlyoffice app."
|
||||
php /var/www/html/occ app:disable onlyoffice
|
||||
else
|
||||
# Install or enable OnlyOffice app as needed
|
||||
if ! [ -d "/var/www/html/custom_apps/onlyoffice" ]; then
|
||||
php /var/www/html/occ app:install onlyoffice
|
||||
|
|
@ -796,6 +800,7 @@ if [ "$ONLYOFFICE_ENABLED" = 'yes' ]; then
|
|||
fi
|
||||
|
||||
php /var/www/html/occ config:app:set onlyoffice DocumentServerUrl --value="https://$ONLYOFFICE_HOST"
|
||||
fi
|
||||
else
|
||||
# Remove OnlyOffice app if disabled and removal is requested
|
||||
if [ "$REMOVE_DISABLED_APPS" = yes ] && \
|
||||
|
|
@ -867,7 +872,7 @@ if [ "$CLAMAV_ENABLED" = 'yes' ]; then
|
|||
sleep 5
|
||||
done
|
||||
if [ "$count" -ge 90 ]; then
|
||||
echo "ClamAV did not start in time. Skipping initialization and disabling files_antivirus app."
|
||||
bash /notify.sh "ClamAV did not start in time!" "Skipping initialization and disabling files_antivirus app."
|
||||
php /var/www/html/occ app:disable files_antivirus
|
||||
else
|
||||
if ! [ -d "/var/www/html/custom_apps/files_antivirus" ]; then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue