From 6b6c9dfbc7d13318aa9d9c6be890e98fb8db22c0 Mon Sep 17 00:00:00 2001 From: szaimen Date: Fri, 21 Jan 2022 18:29:13 +0100 Subject: [PATCH] Correctly set CPU_ARCH for notify_push Signed-off-by: szaimen --- Containers/nextcloud/start.sh | 9 +++++++++ Containers/nextcloud/supervisord.conf | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Containers/nextcloud/start.sh b/Containers/nextcloud/start.sh index 9decac86..8b9c315c 100644 --- a/Containers/nextcloud/start.sh +++ b/Containers/nextcloud/start.sh @@ -11,4 +11,13 @@ 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 "$@" \ No newline at end of file diff --git a/Containers/nextcloud/supervisord.conf b/Containers/nextcloud/supervisord.conf index f9d4f5c3..08a6064f 100644 --- a/Containers/nextcloud/supervisord.conf +++ b/Containers/nextcloud/supervisord.conf @@ -27,4 +27,4 @@ stdout_logfile=/dev/stdout stdout_logfile_maxbytes=0 stderr_logfile=/dev/stderr stderr_logfile_maxbytes=0 -command=/var/www/html/custom_apps/notify_push/bin/x86_64/notify_push /var/www/html/config/config.php --port 7867 --redis-url redis://:%(ENV_REDIS_HOST_PASSWORD)s@%(ENV_REDIS_HOST)s +command=/var/www/html/custom_apps/notify_push/bin/%(ENV_CPU_ARCH)s/notify_push /var/www/html/config/config.php --port 7867 --redis-url redis://:%(ENV_REDIS_HOST_PASSWORD)s@%(ENV_REDIS_HOST)s