From 0a061c09e73cb4aa5d06100b1ad653561adf0300 Mon Sep 17 00:00:00 2001 From: Badintral <79549469+Badintral@users.noreply.github.com> Date: Sat, 6 Jun 2026 14:24:26 +0000 Subject: [PATCH] Allow env variables with spaces (#14969) In https://github.com/community-scripts/ProxmoxVE/pull/10023/commits/95dd153d81f96abfef26d6b3997dad3ff5469b05 the syntax used to export env variables, using xargs, meant it was impossible to use standard crontab syntax, with spaces, for a variable like PHOTOPRISM_INDEX_SCHEDULE. This change should solve that. --- ct/photoprism.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ct/photoprism.sh b/ct/photoprism.sh index bf97afae4..a9554c581 100644 --- a/ct/photoprism.sh +++ b/ct/photoprism.sh @@ -37,7 +37,9 @@ function update_script() { if ! grep -q "photoprism/config/.env" ~/.bashrc 2>/dev/null; then msg_info "Adding environment export for CLI tools" echo '# Load PhotoPrism environment variables for CLI tools' >>~/.bashrc - echo 'export $(grep -v "^#" /opt/photoprism/config/.env | xargs)' >>~/.bashrc + echo 'set -a' >>~/.bashrc + echo 'source /opt/photoprism/config/.env' >>~/.bashrc + echo 'set +a' >>~/.bashrc msg_ok "Added environment export" fi