all-in-one/Containers/nextcloud/start.sh
szaimen 6b6c9dfbc7 Correctly set CPU_ARCH for notify_push
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-01-21 18:33:57 +01:00

23 lines
No EOL
486 B
Bash

#!/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 -p)"
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
exec "$@"