all-in-one/Containers/nextcloud/start.sh
szaimen b08a06573d fix shellcheck
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-02-11 11:44:59 +01:00

24 lines
No EOL
495 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
CPU_ARCH="$(uname -m)"
export CPU_ARCH
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 "$@"