From 7b7f3df71050d6827a42fa29959b4b34ea8ca941 Mon Sep 17 00:00:00 2001 From: Gianluigi Trontini Date: Thu, 3 Apr 2025 15:37:52 +0200 Subject: [PATCH] Fixes #743: Move conditionals for chromium/google chrome at the top of the file --- debian/scripts/init.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/debian/scripts/init.sh b/debian/scripts/init.sh index b4d6174..3cdf076 100755 --- a/debian/scripts/init.sh +++ b/debian/scripts/init.sh @@ -1,5 +1,12 @@ #!/bin/sh -eu +# Set PDF generation browser path based on architecture +if [ "$(dpkg --print-architecture)" = "amd64" ]; then + export SNAPPDF_CHROMIUM_PATH=/usr/bin/google-chrome-stable +elif [ "$(dpkg --print-architecture)" = "arm64" ]; then + export SNAPPDF_CHROMIUM_PATH=/usr/bin/chromium +fi + if [ "$*" = 'supervisord -c /etc/supervisor/conf.d/supervisord.conf' ]; then # Check for required folders and create if needed @@ -57,11 +64,4 @@ if [ "$*" = 'supervisord -c /etc/supervisor/conf.d/supervisord.conf' ]; then echo "Starting supervisord..." fi -# Set PDF generation browser path based on architecture -if [ "$(dpkg --print-architecture)" = "amd64" ]; then - export SNAPPDF_CHROMIUM_PATH=/usr/bin/google-chrome-stable -elif [ "$(dpkg --print-architecture)" = "arm64" ]; then - export SNAPPDF_CHROMIUM_PATH=/usr/bin/chromium -fi - -exec "$@" +exec "$@" \ No newline at end of file