mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-06-06 23:55:15 +02:00
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:
+3
-1
@@ -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