Compare commits

..

1 Commits

Author SHA1 Message Date
CanbiZ (MickLesk)
8d6675ffb7 fix(migration): atomic /usr/bin/update replacement to prevent syntax errors
All 8 migration scripts (runtipi, dockge, dokploy, coolify, komodo,
alpine-komodo, overseerr, jellyseerr) overwrote /usr/bin/update in-place
while the parent shell still had the file open for reading. Since the
new content is longer than the original, bash would read leftover bytes
after the child process exited, causing garbled output or syntax errors
like: /usr/bin/update: line 2: syntax error near unexpected token )

Fix:
- Write to a temp file first, then mv over /usr/bin/update (atomic
  inode replacement so parent shell sees EOF on old fd)
- Remove unnecessary shebang from heredoc content in overseerr/jellyseerr
  (consistent with all other update scripts and install.func)
2026-03-04 07:44:14 +01:00
2 changed files with 4 additions and 4 deletions

View File

@@ -416,7 +416,6 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
- #### 🐞 Bug Fixes
- addon migrations: /usr/bin/update replacement to prevent syntax error [@MickLesk](https://github.com/MickLesk) ([#12540](https://github.com/community-scripts/ProxmoxVE/pull/12540))
- fix(immich): correct LibRaw clone URL to official upstream [@DenislavDenev](https://github.com/DenislavDenev) ([#12526](https://github.com/community-scripts/ProxmoxVE/pull/12526))
### 💾 Core

View File

@@ -6500,13 +6500,14 @@ function setup_postgresql() {
local SUITE
case "$DISTRO_CODENAME" in
trixie | forky | sid)
if verify_repo_available "https://apt.postgresql.org/pub/repos/apt" "trixie-pgdg"; then
SUITE="trixie-pgdg"
else
msg_warn "PGDG repo not available for ${DISTRO_CODENAME}, falling back to distro packages"
USE_PGDG_REPO=false setup_postgresql
return $?
SUITE="bookworm-pgdg"
fi
;;
*)
SUITE=$(get_fallback_suite "$DISTRO_ID" "$DISTRO_CODENAME" "https://apt.postgresql.org/pub/repos/apt")