mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-04-05 09:04:01 -04:00
Bump Immich to v2.6.2 and adjust chown handling
Update Immich release references from v2.6.1 to v2.6.2 in ct/immich.sh and install/immich-install.sh. Replace broad recursive chown -R on the install dir with a safer approach that avoids recursing into the upload directory (which may be a mounted volume with restricted permissions): set ownership on the install dir itself, chown each top-level entry except 'upload', and attempt to chown the upload path while ignoring errors. Also adjust ordering for /var/log/immich chown to avoid permission issues when enabling services.
This commit is contained in:
12
ct/immich.sh
12
ct/immich.sh
@@ -109,7 +109,7 @@ EOF
|
|||||||
msg_ok "Image-processing libraries up to date"
|
msg_ok "Image-processing libraries up to date"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
RELEASE="v2.6.1"
|
RELEASE="v2.6.2"
|
||||||
if check_for_gh_release "Immich" "immich-app/immich" "${RELEASE}" "each release is tested individually before the version is updated. Please do not open issues for this"; then
|
if check_for_gh_release "Immich" "immich-app/immich" "${RELEASE}" "each release is tested individually before the version is updated. Please do not open issues for this"; then
|
||||||
if [[ $(cat ~/.immich) > "2.5.1" ]]; then
|
if [[ $(cat ~/.immich) > "2.5.1" ]]; then
|
||||||
msg_info "Enabling Maintenance Mode"
|
msg_info "Enabling Maintenance Mode"
|
||||||
@@ -214,7 +214,10 @@ EOF
|
|||||||
|
|
||||||
cd "$SRC_DIR"/machine-learning
|
cd "$SRC_DIR"/machine-learning
|
||||||
mkdir -p "$ML_DIR"
|
mkdir -p "$ML_DIR"
|
||||||
chown -R immich:immich "$INSTALL_DIR"
|
# chown excluding upload dir contents (may be a mount with restricted permissions)
|
||||||
|
chown immich:immich "$INSTALL_DIR"
|
||||||
|
find "$INSTALL_DIR" -maxdepth 1 -mindepth 1 ! -name upload -exec chown -R immich:immich {} +
|
||||||
|
chown immich:immich "${UPLOAD_DIR:-$INSTALL_DIR/upload}" 2>/dev/null || true
|
||||||
chown immich:immich ./uv.lock
|
chown immich:immich ./uv.lock
|
||||||
export VIRTUAL_ENV="${ML_DIR}"/ml-venv
|
export VIRTUAL_ENV="${ML_DIR}"/ml-venv
|
||||||
export UV_HTTP_TIMEOUT=300
|
export UV_HTTP_TIMEOUT=300
|
||||||
@@ -273,7 +276,10 @@ EOF
|
|||||||
systemctl daemon-reload
|
systemctl daemon-reload
|
||||||
fi
|
fi
|
||||||
|
|
||||||
chown -R immich:immich "$INSTALL_DIR"
|
# chown excluding upload dir contents (may be a mount with restricted permissions)
|
||||||
|
chown immich:immich "$INSTALL_DIR"
|
||||||
|
find "$INSTALL_DIR" -maxdepth 1 -mindepth 1 ! -name upload -exec chown -R immich:immich {} +
|
||||||
|
chown immich:immich "${UPLOAD_DIR:-$INSTALL_DIR/upload}" 2>/dev/null || true
|
||||||
if [[ "${MAINT_MODE:-0}" == 1 ]]; then
|
if [[ "${MAINT_MODE:-0}" == 1 ]]; then
|
||||||
msg_info "Disabling Maintenance Mode"
|
msg_info "Disabling Maintenance Mode"
|
||||||
cd /opt/immich/app/bin
|
cd /opt/immich/app/bin
|
||||||
|
|||||||
@@ -295,7 +295,7 @@ ML_DIR="${APP_DIR}/machine-learning"
|
|||||||
GEO_DIR="${INSTALL_DIR}/geodata"
|
GEO_DIR="${INSTALL_DIR}/geodata"
|
||||||
mkdir -p {"${APP_DIR}","${UPLOAD_DIR}","${GEO_DIR}","${INSTALL_DIR}"/cache}
|
mkdir -p {"${APP_DIR}","${UPLOAD_DIR}","${GEO_DIR}","${INSTALL_DIR}"/cache}
|
||||||
|
|
||||||
fetch_and_deploy_gh_release "Immich" "immich-app/immich" "tarball" "v2.6.1" "$SRC_DIR"
|
fetch_and_deploy_gh_release "Immich" "immich-app/immich" "tarball" "v2.6.2" "$SRC_DIR"
|
||||||
PNPM_VERSION="$(jq -r '.packageManager | split("@")[1] | split("+")[0]' ${SRC_DIR}/package.json)"
|
PNPM_VERSION="$(jq -r '.packageManager | split("@")[1] | split("+")[0]' ${SRC_DIR}/package.json)"
|
||||||
NODE_VERSION="24" NODE_MODULE="pnpm@${PNPM_VERSION}" setup_nodejs
|
NODE_VERSION="24" NODE_MODULE="pnpm@${PNPM_VERSION}" setup_nodejs
|
||||||
|
|
||||||
@@ -344,7 +344,11 @@ msg_ok "Installed Immich Server, Web and Plugin Components"
|
|||||||
|
|
||||||
cd "$SRC_DIR"/machine-learning
|
cd "$SRC_DIR"/machine-learning
|
||||||
$STD useradd -U -s /usr/sbin/nologin -r -M -d "$INSTALL_DIR" immich
|
$STD useradd -U -s /usr/sbin/nologin -r -M -d "$INSTALL_DIR" immich
|
||||||
mkdir -p "$ML_DIR" && chown -R immich:immich "$INSTALL_DIR"
|
mkdir -p "$ML_DIR"
|
||||||
|
# chown excluding upload dir contents (may be a mount with restricted permissions)
|
||||||
|
chown immich:immich "$INSTALL_DIR"
|
||||||
|
find "$INSTALL_DIR" -maxdepth 1 -mindepth 1 ! -name upload -exec chown -R immich:immich {} +
|
||||||
|
chown immich:immich "$UPLOAD_DIR" 2>/dev/null || true
|
||||||
export VIRTUAL_ENV="${ML_DIR}/ml-venv"
|
export VIRTUAL_ENV="${ML_DIR}/ml-venv"
|
||||||
export UV_HTTP_TIMEOUT=300
|
export UV_HTTP_TIMEOUT=300
|
||||||
if [[ -f ~/.openvino ]]; then
|
if [[ -f ~/.openvino ]]; then
|
||||||
@@ -499,7 +503,11 @@ StandardError=append:/var/log/immich/ml.log
|
|||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
EOF
|
EOF
|
||||||
chown -R immich:immich "$INSTALL_DIR" /var/log/immich
|
chown -R immich:immich /var/log/immich
|
||||||
|
# chown excluding upload dir contents (may be a mount with restricted permissions)
|
||||||
|
chown immich:immich "$INSTALL_DIR"
|
||||||
|
find "$INSTALL_DIR" -maxdepth 1 -mindepth 1 ! -name upload -exec chown -R immich:immich {} +
|
||||||
|
chown immich:immich "$UPLOAD_DIR" 2>/dev/null || true
|
||||||
systemctl enable -q --now immich-ml.service immich-web.service
|
systemctl enable -q --now immich-ml.service immich-web.service
|
||||||
msg_ok "Modified user, created env file, scripts and services"
|
msg_ok "Modified user, created env file, scripts and services"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user