mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-12-19 22:16:49 +00:00
Added env variable to nextcloud container, changed reachability in favor of apache container host.
Signed-off-by: JMarcosHP <jehuherrerap@hotmail.com>
This commit is contained in:
parent
79d4ce1436
commit
3c2a1edcc4
3 changed files with 8 additions and 20 deletions
|
|
@ -1,24 +1,10 @@
|
|||
#!/bin/bash
|
||||
|
||||
# ENV Variables
|
||||
MAX_RETRY=3
|
||||
COUNT=1
|
||||
|
||||
# Wait until the domain is reachable
|
||||
sleep 15
|
||||
while [ "$COUNT" -le "$MAX_RETRY" ]; do
|
||||
if nc -z "$NC_DOMAIN" 443; then
|
||||
echo "Domain reached."
|
||||
break
|
||||
else
|
||||
echo "Attempt $COUNT: Domain not reachable. Retrying in 15 seconds..."
|
||||
sleep 15
|
||||
((COUNT++))
|
||||
fi
|
||||
# Wait until the apache container is ready
|
||||
while ! nc -z "$APACHE_HOST" "$APACHE_PORT"; do
|
||||
echo "Waiting for Apache to become available..."
|
||||
sleep 15
|
||||
done
|
||||
if [ "$COUNT" -gt "$MAX_RETRY" ]; then
|
||||
echo "The domain could not be reached after $MAX_RETRY attempts. Proceeding anyway..."
|
||||
fi
|
||||
|
||||
if [ -n "$NEXTCLOUD_EXEC_COMMANDS" ]; then
|
||||
echo "#!/bin/bash" > /tmp/nextcloud-exec-commands
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue