all-in-one/Containers/nextcloud/start.sh

23 lines
486 B
Bash
Raw Normal View History

2021-11-30 11:20:42 +01:00
#!/bin/bash
# Only start container if database is accessible
while ! nc -z "$POSTGRES_HOST" 5432; do
echo "Waiting for database to start..."
sleep 5
done
# Run original entrypoint
if ! bash /entrypoint.sh; then
exit 1
fi
# Correctly set CPU_ARCH for notify_push
export CPU_ARCH="$(uname -m)"
if [ -z "$CPU_ARCH" ]; then
echo "Could not get processor architecture. Exiting."
exit 1
elif [ "$CPU_ARCH" != "x86_64" ]; then
export CPU_ARCH="aarch64"
fi
2021-11-30 11:20:42 +01:00
exec "$@"