Update start.sh

Signed-off-by: Zoey <zoey@z0ey.de>
This commit is contained in:
Zoey 2023-08-24 16:46:35 +02:00 committed by Simon L
parent 5795286a7b
commit 685786c5f6

View file

@ -3,6 +3,12 @@
openssl req -nodes -new -x509 -subj '/CN=*' -sha256 -keyout /etc/privkey.pem -out /etc/fullchain.pem -days 365000
cat /etc/fullchain.pem /etc/privkey.pem | tee /etc/cert.pem
# Only start container if nextcloud is accessible
while ! nc -z "$NEXTCLOUD_HOST" 9000; do
echo "Waiting for Nextcloud to start..."
sleep 5
done
set -x
IPv4_ADDRESS_NC="$(dig nextcloud-aio-nextcloud IN A +short | grep '^[0-9.]\+$' | sort | head -n1)"
sed -i "s|NC_IPV4_PLACEHOLDER|$IPv4_ADDRESS_NC|g"