Compare commits

..

2 Commits

Author SHA1 Message Date
MickLesk
dbf3fa6f1d fix(tools.func): remove dangerous trap in create_temp_dir()
The EXIT/ERR/INT/TERM trap inside create_temp_dir() overwrites any
global traps and fires when the shell exits, not when the calling
function returns. Since the function is a utility that returns a path
via stdout, the trap fires immediately on function return and cannot
properly clean up the caller's temp dir. Callers already handle their
own cleanup via explicit rm -rf.
2026-03-19 20:26:38 +01:00
MickLesk
876d14721d refactor(tools.func): quality-of-life improvements
- setup_java(): replace dpkg -l with dpkg-query to avoid column truncation
  that caused version detection to fail and trigger unnecessary reinstalls
- get_cached_version(): return 1 when cache file not found (was always 0)
- setup_uv(): use trap RETURN instead of EXIT to avoid overwriting global
  traps and ensure cleanup runs on function return, not shell exit
- setup_docker(): declare DOCKER_CURRENT_VERSION and DOCKER_LATEST_VERSION
  as local to prevent global namespace pollution
2026-03-19 20:20:02 +01:00
11 changed files with 24 additions and 53 deletions

View File

@@ -431,28 +431,14 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
- #### 🐞 Bug Fixes - #### 🐞 Bug Fixes
- fix: remove extra backslash to match single quoted here-doc [@Zelnes](https://github.com/Zelnes) ([#13108](https://github.com/community-scripts/ProxmoxVE/pull/13108))
- Reactive-Resume: Upgrade Node to 24 and enable Corepack [@MickLesk](https://github.com/MickLesk) ([#13093](https://github.com/community-scripts/ProxmoxVE/pull/13093))
- Increase Tracearr RAM; derive APP_VERSION [@MickLesk](https://github.com/MickLesk) ([#13087](https://github.com/community-scripts/ProxmoxVE/pull/13087)) - Increase Tracearr RAM; derive APP_VERSION [@MickLesk](https://github.com/MickLesk) ([#13087](https://github.com/community-scripts/ProxmoxVE/pull/13087))
- ProjectSend: Update application access URL [@tremor021](https://github.com/tremor021) ([#13078](https://github.com/community-scripts/ProxmoxVE/pull/13078)) - ProjectSend: Update application access URL [@tremor021](https://github.com/tremor021) ([#13078](https://github.com/community-scripts/ProxmoxVE/pull/13078))
- Dispatcharr: use npm install --no-audit --progress=false [@MickLesk](https://github.com/MickLesk) ([#13074](https://github.com/community-scripts/ProxmoxVE/pull/13074)) - Dispatcharr: use npm install --no-audit --progress=false [@MickLesk](https://github.com/MickLesk) ([#13074](https://github.com/community-scripts/ProxmoxVE/pull/13074))
- core: reorder hwaccel setup and adjust GPU group usermod [@MickLesk](https://github.com/MickLesk) ([#13072](https://github.com/community-scripts/ProxmoxVE/pull/13072)) - core: reorder hwaccel setup and adjust GPU group usermod [@MickLesk](https://github.com/MickLesk) ([#13072](https://github.com/community-scripts/ProxmoxVE/pull/13072))
- #### ✨ New Features
- tools.func: display pin reason in release-check messages [@MickLesk](https://github.com/MickLesk) ([#13095](https://github.com/community-scripts/ProxmoxVE/pull/13095))
- NocoDB: Unpin Version to latest [@MickLesk](https://github.com/MickLesk) ([#13094](https://github.com/community-scripts/ProxmoxVE/pull/13094))
### 💾 Core
- #### 🐞 Bug Fixes
- tools.func: use dpkg-query for reliable JDK version detection [@MickLesk](https://github.com/MickLesk) ([#13101](https://github.com/community-scripts/ProxmoxVE/pull/13101))
### 📚 Documentation ### 📚 Documentation
- Update link from helper-scripts.com to community-scripts.org [@adnanvaldes](https://github.com/adnanvaldes) ([#13098](https://github.com/community-scripts/ProxmoxVE/pull/13098)) - github: add PocketBase bot workflow [@MickLesk](https://github.com/MickLesk) ([#13075](https://github.com/community-scripts/ProxmoxVE/pull/13075))
- github: add PocketBase bot workflow [@MickLesk](https://github.com/MickLesk) ([#13075](https://github.com/community-scripts/ProxmoxVE/pull/13075))
## 2026-03-18 ## 2026-03-18

View File

@@ -130,7 +130,7 @@ Choose your preferred installation method:
The fastest way to get started: The fastest way to get started:
1. Visit **[community-scripts.org](https://community-scripts.org/)** 🌐 1. Visit **[helper-scripts.com](https://helper-scripts.com/)** 🌐
2. Search for your desired script (e.g., "Home Assistant", "Docker") 2. Search for your desired script (e.g., "Home Assistant", "Docker")
3. Copy the bash command displayed on the script page 3. Copy the bash command displayed on the script page
4. Open your **Proxmox Shell** and paste the command 4. Open your **Proxmox Shell** and paste the command

View File

@@ -110,7 +110,7 @@ EOF
fi fi
RELEASE="v2.5.6" RELEASE="v2.5.6"
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}"; 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"
cd /opt/immich/app/bin cd /opt/immich/app/bin
@@ -125,7 +125,7 @@ EOF
msg_ok "Stopped Services" msg_ok "Stopped Services"
VCHORD_RELEASE="0.5.3" VCHORD_RELEASE="0.5.3"
[[ -f ~/.vchord_version ]] && mv ~/.vchord_version ~/.vectorchord [[ -f ~/.vchord_version ]] && mv ~/.vchord_version ~/.vectorchord
if check_for_gh_release "VectorChord" "tensorchord/VectorChord" "${VCHORD_RELEASE}" "updated together with Immich after testing"; then if check_for_gh_release "VectorChord" "tensorchord/VectorChord" "${VCHORD_RELEASE}"; then
fetch_and_deploy_gh_release "VectorChord" "tensorchord/VectorChord" "binary" "${VCHORD_RELEASE}" "/tmp" "postgresql-16-vchord_*_amd64.deb" fetch_and_deploy_gh_release "VectorChord" "tensorchord/VectorChord" "binary" "${VCHORD_RELEASE}" "/tmp" "postgresql-16-vchord_*_amd64.deb"
systemctl restart postgresql systemctl restart postgresql
$STD sudo -u postgres psql -d immich -c "ALTER EXTENSION vector UPDATE;" $STD sudo -u postgres psql -d immich -c "ALTER EXTENSION vector UPDATE;"

View File

@@ -23,18 +23,17 @@ function update_script() {
header_info header_info
check_container_storage check_container_storage
check_container_resources check_container_resources
#RELEASE="0.301.1" RELEASE="0.301.1"
if [[ ! -f /etc/systemd/system/nocodb.service ]]; then if [[ ! -f /etc/systemd/system/nocodb.service ]]; then
msg_error "No ${APP} Installation Found!" msg_error "No ${APP} Installation Found!"
exit exit
fi fi
#if check_for_gh_release "nocodb" "nocodb/nocodb" "${RELEASE}"; then if check_for_gh_release "nocodb" "nocodb/nocodb" "${RELEASE}"; then
if check_for_gh_release "nocodb" "nocodb/nocodb"; then
msg_info "Stopping Service" msg_info "Stopping Service"
systemctl stop nocodb systemctl stop nocodb
msg_ok "Stopped Service" msg_ok "Stopped Service"
fetch_and_deploy_gh_release "nocodb" "nocodb/nocodb" "singlefile" "latest" "/opt/nocodb/" "Noco-linux-x64" fetch_and_deploy_gh_release "nocodb" "nocodb/nocodb" "singlefile" "${RELEASE}" "/opt/nocodb/" "Noco-linux-x64"
msg_info "Starting Service" msg_info "Starting Service"
systemctl start nocodb systemctl start nocodb

View File

@@ -30,7 +30,7 @@ function update_script() {
fi fi
RELEASE="v5.2.0" RELEASE="v5.2.0"
if check_for_gh_release "OpenCloud" "opencloud-eu/opencloud" "${RELEASE}" "each release is tested individually before the version is updated. Please do not open issues for this"; then if check_for_gh_release "OpenCloud" "opencloud-eu/opencloud" "${RELEASE}"; then
msg_info "Stopping services" msg_info "Stopping services"
systemctl stop opencloud opencloud-wopi systemctl stop opencloud opencloud-wopi
msg_ok "Stopped services" msg_ok "Stopped services"

View File

@@ -29,7 +29,7 @@ function update_script() {
exit exit
fi fi
setup_mariadb setup_mariadb
if check_for_gh_release "plant-it" "MDeLuise/plant-it" "${RELEASE}" "last version that includes the web frontend"; then if check_for_gh_release "plant-it" "MDeLuise/plant-it" "${RELEASE}"; then
msg_info "Stopping Service" msg_info "Stopping Service"
systemctl stop plant-it systemctl stop plant-it
msg_info "Stopped Service" msg_info "Stopped Service"

View File

@@ -34,14 +34,10 @@ function update_script() {
msg_ok "Stopped services" msg_ok "Stopped services"
cp /opt/reactive-resume/.env /opt/reactive-resume.env.bak cp /opt/reactive-resume/.env /opt/reactive-resume.env.bak
NODE_VERSION="24" setup_nodejs
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "reactive-resume" "amruthpillai/reactive-resume" "tarball" "latest" "/opt/reactive-resume" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "reactive-resume" "amruthpillai/reactive-resume" "tarball" "latest" "/opt/reactive-resume"
msg_info "Updating Reactive Resume (Patience)" msg_info "Updating Reactive Resume (Patience)"
cd /opt/reactive-resume cd /opt/reactive-resume
export COREPACK_ENABLE_DOWNLOAD_PROMPT=0
corepack enable
corepack prepare --activate
export CI="true" export CI="true"
export NODE_ENV="production" export NODE_ENV="production"
$STD pnpm install --frozen-lockfile $STD pnpm install --frozen-lockfile

View File

@@ -13,11 +13,11 @@ setting_up_container
network_check network_check
update_os update_os
fetch_and_deploy_gh_release "nocodb" "nocodb/nocodb" "singlefile" "latest" "/opt/nocodb/" "Noco-linux-x64" fetch_and_deploy_gh_release "nocodb" "nocodb/nocodb" "singlefile" "0.301.1" "/opt/nocodb/" "Noco-linux-x64"
msg_info "Creating Service" msg_info "Creating Service"
cat <<EOF >/etc/systemd/system/nocodb.service cat <<EOF >/etc/systemd/system/nocodb.service
[Unit] echo "[Unit]
Description=nocodb Description=nocodb
[Service] [Service]

View File

@@ -36,7 +36,7 @@ ExecStart=/usr/local/bin/prometheus \
--config.file=/etc/prometheus/prometheus.yml \ --config.file=/etc/prometheus/prometheus.yml \
--storage.tsdb.path=/var/lib/prometheus/ \ --storage.tsdb.path=/var/lib/prometheus/ \
--web.listen-address=0.0.0.0:9090 --web.listen-address=0.0.0.0:9090
ExecReload=/bin/kill -HUP $MAINPID ExecReload=/bin/kill -HUP \$MAINPID
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target

View File

@@ -15,7 +15,7 @@ update_os
PG_VERSION="16" setup_postgresql PG_VERSION="16" setup_postgresql
PG_DB_NAME="reactive_resume" PG_DB_USER="reactive_resume" setup_postgresql_db PG_DB_NAME="reactive_resume" PG_DB_USER="reactive_resume" setup_postgresql_db
NODE_VERSION="24" setup_nodejs NODE_VERSION="22" NODE_MODULE="pnpm@latest" setup_nodejs
msg_info "Installing Dependencies" msg_info "Installing Dependencies"
$STD apt install -y chromium $STD apt install -y chromium
@@ -25,9 +25,6 @@ fetch_and_deploy_gh_release "reactive-resume" "amruthpillai/reactive-resume" "ta
msg_info "Building Reactive Resume (Patience)" msg_info "Building Reactive Resume (Patience)"
cd /opt/reactive-resume cd /opt/reactive-resume
export COREPACK_ENABLE_DOWNLOAD_PROMPT=0
corepack enable
corepack prepare --activate
export NODE_ENV="production" export NODE_ENV="production"
export CI="true" export CI="true"
$STD pnpm install --frozen-lockfile $STD pnpm install --frozen-lockfile

View File

@@ -282,7 +282,7 @@ get_cached_version() {
cat "/var/cache/app-versions/${app}_version.txt" cat "/var/cache/app-versions/${app}_version.txt"
return 0 return 0
fi fi
return 0 return 1
} }
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
@@ -1100,8 +1100,9 @@ get_system_arch() {
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
create_temp_dir() { create_temp_dir() {
local tmp_dir=$(mktemp -d) local tmp_dir=$(mktemp -d)
# Set trap to cleanup on EXIT, ERR, INT, TERM # Callers should handle their own cleanup (rm -rf "$tmpdir")
trap "rm -rf '$tmp_dir'" EXIT ERR INT TERM # Do NOT set trap here — it would overwrite global traps and only fire
# when create_temp_dir() itself returns, not the calling function
echo "$tmp_dir" echo "$tmp_dir"
} }
@@ -2271,7 +2272,6 @@ check_for_gh_release() {
local app="$1" local app="$1"
local source="$2" local source="$2"
local pinned_version_in="${3:-}" # optional local pinned_version_in="${3:-}" # optional
local pin_reason="${4:-}" # optional reason shown to user
local app_lc="" local app_lc=""
app_lc="$(echo "${app,,}" | tr -d ' ')" app_lc="$(echo "${app,,}" | tr -d ' ')"
local current_file="$HOME/.${app_lc}" local current_file="$HOME/.${app_lc}"
@@ -2445,11 +2445,7 @@ check_for_gh_release() {
return 0 return 0
fi fi
if [[ -n "$pin_reason" ]]; then msg_ok "No update available: ${app} is already on pinned version (${current})"
msg_ok "No update available: ${app} (${current}) - update held back: ${pin_reason}"
else
msg_ok "No update available: ${app} (${current}) - update temporarily held back due to issues with newer releases"
fi
return 1 return 1
fi fi
@@ -2488,7 +2484,6 @@ check_for_codeberg_release() {
local app="$1" local app="$1"
local source="$2" local source="$2"
local pinned_version_in="${3:-}" # optional local pinned_version_in="${3:-}" # optional
local pin_reason="${4:-}" # optional reason shown to user
local app_lc="${app,,}" local app_lc="${app,,}"
local current_file="$HOME/.${app_lc}" local current_file="$HOME/.${app_lc}"
@@ -2568,11 +2563,7 @@ check_for_codeberg_release() {
return 0 return 0
fi fi
if [[ -n "$pin_reason" ]]; then msg_ok "No update available: ${app} is already on pinned version (${current})"
msg_ok "No update available: ${app} (${current}) - update held back: ${pin_reason}"
else
msg_ok "No update available: ${app} (${current}) - update temporarily held back due to issues with newer releases"
fi
return 1 return 1
fi fi
@@ -5361,7 +5352,7 @@ function setup_java() {
"main" "main"
fi fi
# Get currently installed version # Get currently installed version (use dpkg-query to avoid column truncation)
local INSTALLED_VERSION="" local INSTALLED_VERSION=""
INSTALLED_VERSION=$(dpkg-query -W -f '${Package}\n' 2>/dev/null | grep -oP '^temurin-\K[0-9]+(?=-jdk$)' | head -n1 || echo "") INSTALLED_VERSION=$(dpkg-query -W -f '${Package}\n' 2>/dev/null | grep -oP '^temurin-\K[0-9]+(?=-jdk$)' | head -n1 || echo "")
@@ -7842,8 +7833,8 @@ function setup_uv() {
local TMP_DIR=$(mktemp -d) local TMP_DIR=$(mktemp -d)
local CACHED_VERSION local CACHED_VERSION
# trap for TMP Cleanup # trap for TMP Cleanup (RETURN instead of EXIT to avoid overwriting global traps)
trap "rm -rf '$TMP_DIR'" EXIT trap "rm -rf '$TMP_DIR'" RETURN
CACHED_VERSION=$(get_cached_version "uv") CACHED_VERSION=$(get_cached_version "uv")
@@ -8113,6 +8104,8 @@ function setup_docker() {
local docker_installed=false local docker_installed=false
local portainer_installed=false local portainer_installed=false
local USE_DOCKER_REPO="${USE_DOCKER_REPO:-false}" local USE_DOCKER_REPO="${USE_DOCKER_REPO:-false}"
local DOCKER_CURRENT_VERSION=""
local DOCKER_LATEST_VERSION=""
# Check if Docker is already installed # Check if Docker is already installed
if command -v docker &>/dev/null; then if command -v docker &>/dev/null; then