mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-08-01 18:09:10 -04:00
Allow env variables with spaces (#14969)
In 95dd153d81
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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user