From 4588e59f5fda41a59d7d95b3d2bf9a5d759eed2d Mon Sep 17 00:00:00 2001 From: Tim Moore <1232390+angusmaul@users.noreply.github.com> Date: Wed, 12 Aug 2026 20:21:25 +1000 Subject: [PATCH] fix(stirling-pdf): install unoserver on the system python, and append to .env (#16439) --- install/stirling-pdf-install.sh | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/install/stirling-pdf-install.sh b/install/stirling-pdf-install.sh index d0a4cbfc26a..6147fc61fce 100644 --- a/install/stirling-pdf-install.sh +++ b/install/stirling-pdf-install.sh @@ -34,7 +34,11 @@ msg_ok "Installed Dependencies" PYTHON_VERSION="3.12" setup_uv JAVA_VERSION="25" setup_java -read -r -p "${TAB3}Do you want to use Stirling-PDF with Login? (no/n = without Login) [Y/n] " response +if ! read -r -p "${TAB3}Do you want to use Stirling-PDF with Login? (no/n = without Login) [Y/n] " response; then + # No interactive stdin (EOF): fall back to the no-login install instead of + # silently selecting login, which the -z test below would otherwise do. + response="n" +fi response=${response,,} # Convert to lowercase login_mode="false" if [[ "$response" == "y" || "$response" == "yes" || -z "$response" ]]; then @@ -72,7 +76,10 @@ $STD uv pip install \ pillow \ pdf2image $STD apt install -y python3-uno python3-pip -$STD pip3 install --break-system-packages --timeout=120 unoserver +# Install unoserver for the system Python, not the venv activated above: `uno` is +# provided by python3-uno for /usr/bin/python3 only, and unoserver.service expects +# /usr/local/bin/unoserver. A bare `pip3` here resolves to the venv's pip. +$STD /usr/bin/python3 -m pip install --break-system-packages --timeout=120 unoserver ln -sf /opt/.venv/bin/python3 /usr/local/bin/python3 ln -sf /opt/.venv/bin/pip /usr/local/bin/pip msg_ok "Installed Python Dependencies" @@ -104,7 +111,7 @@ PATH=/opt/.venv/bin:/usr/lib/libreoffice/program:/usr/local/sbin:/usr/local/bin: EOF if [[ "$login_mode" == "true" ]]; then - cat </opt/Stirling-PDF/.env + cat <>/opt/Stirling-PDF/.env # activate Login DISABLE_ADDITIONAL_FEATURES=false SECURITY_ENABLELOGIN=true