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.
This commit is contained in:
Badintral
2026-06-06 14:24:26 +00:00
committed by GitHub
parent 7d3eb376d4
commit 0a061c09e7
+3 -1
View File
@@ -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