PhotoPrism: export env variables for CLI tools (#10023)

This commit is contained in:
CanbiZ
2025-12-16 11:48:35 +01:00
committed by GitHub
parent 7b55077a00
commit b524cbe232
2 changed files with 9 additions and 0 deletions

View File

@ -32,6 +32,13 @@ function update_script() {
systemctl stop photoprism
msg_ok "Stopped PhotoPrism"
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
msg_ok "Added environment export"
fi
fetch_and_deploy_gh_release "photoprism" "photoprism/photoprism" "prebuild" "latest" "/opt/photoprism" "*linux-amd64.tar.gz"
LIBHEIF_URL=$(curl -fsSL "https://dl.photoprism.app/dist/libheif/" | grep -oP "libheif-bookworm-amd64-v[0-9\.]+\.tar\.gz" | sort -V | tail -n 1)

View File

@ -28,6 +28,8 @@ $STD apt install -y \
lsb-release
echo 'export PATH=/usr/local:$PATH' >>~/.bashrc
echo '# Load PhotoPrism environment variables for CLI tools' >>~/.bashrc
echo 'export $(grep -v "^#" /opt/photoprism/config/.env | xargs)' >>~/.bashrc
export PATH=/usr/local:$PATH
msg_ok "Installed Dependencies"