mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-02-03 20:03:25 +01:00
[FEAT] Immich: Enable Maintenance Mode before update (#11342)
* [FEAT] Immich: enable Maintenance Mode prior to update - Checks if current version is 2.5.2 or higher - Also disables Maintenance Mode afterwards * fix pathing issue; suppress `cd -` output
This commit is contained in:
16
ct/immich.sh
16
ct/immich.sh
@@ -114,6 +114,14 @@ EOF
|
||||
|
||||
RELEASE="2.5.2"
|
||||
if check_for_gh_release "immich" "immich-app/immich" "${RELEASE}"; then
|
||||
if [[ $(cat ~/.immich) > "2.5.1" ]]; then
|
||||
msg_info "Enabling Maintenance Mode"
|
||||
cd /opt/immich/app/bin
|
||||
$STD bash ./immich-admin enable-maintenance-mode
|
||||
export MAINT_MODE=1
|
||||
$STD cd -
|
||||
msg_ok "Enabled Maintenance Mode"
|
||||
fi
|
||||
msg_info "Stopping Services"
|
||||
systemctl stop immich-web
|
||||
systemctl stop immich-ml
|
||||
@@ -242,6 +250,14 @@ EOF
|
||||
ln -s "$GEO_DIR" "$APP_DIR"
|
||||
|
||||
chown -R immich:immich "$INSTALL_DIR"
|
||||
if [[ "$MAINT_MODE" == 1 ]]; then
|
||||
msg_info "Disabling Maintenance Mode"
|
||||
cd /opt/immich/app/bin
|
||||
$STD bash ./immich-admin disable-maintenance-mode
|
||||
unset MAINT_MODE
|
||||
$STD cd -
|
||||
msg_ok "Disabled Maintenance Mode"
|
||||
fi
|
||||
systemctl restart immich-ml immich-web
|
||||
msg_ok "Updated successfully!"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user