mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-06-21 23:11:18 +02:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| fb7ceab989 | |||
| 1363e5eab8 | |||
| 16ea8eb8f6 | |||
| 1f01f32853 |
@@ -496,10 +496,6 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
|
|||||||
- [arm64] port scripts titled between papra and qbittorrent to support arm64 [@asylumexp](https://github.com/asylumexp) ([#15258](https://github.com/community-scripts/ProxmoxVE/pull/15258))
|
- [arm64] port scripts titled between papra and qbittorrent to support arm64 [@asylumexp](https://github.com/asylumexp) ([#15258](https://github.com/community-scripts/ProxmoxVE/pull/15258))
|
||||||
- [arm64] Port scripts between mediamtx-nocodb to support arm64 [@asylumexp](https://github.com/asylumexp) ([#15254](https://github.com/community-scripts/ProxmoxVE/pull/15254))
|
- [arm64] Port scripts between mediamtx-nocodb to support arm64 [@asylumexp](https://github.com/asylumexp) ([#15254](https://github.com/community-scripts/ProxmoxVE/pull/15254))
|
||||||
|
|
||||||
- #### 🔧 Refactor
|
|
||||||
|
|
||||||
- tools.func: centralize Node.js corepack and npm handling in `setup_nodejs()` [@MickLesk](https://github.com/MickLesk) ([#15268](https://github.com/community-scripts/ProxmoxVE/pull/15268))
|
|
||||||
|
|
||||||
## 2026-06-20
|
## 2026-06-20
|
||||||
|
|
||||||
### 🆕 New Scripts
|
### 🆕 New Scripts
|
||||||
|
|||||||
+12
-34
@@ -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 1
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
@@ -462,10 +462,10 @@ install_packages_with_retry() {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
# If some packages installed, consider partial success
|
||||||
if [[ ${#failed[@]} -lt ${#packages[@]} ]]; then
|
if [[ ${#failed[@]} -lt ${#packages[@]} ]]; then
|
||||||
if [[ ${#failed[@]} -gt 0 ]]; then
|
if [[ ${#failed[@]} -gt 0 ]]; then
|
||||||
msg_error "Partial install — failed packages: ${failed[*]}"
|
msg_warn "Partially installed. Failed packages: ${failed[*]}"
|
||||||
return 100
|
|
||||||
fi
|
fi
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
@@ -1122,34 +1122,11 @@ get_system_arch() {
|
|||||||
|
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
# Create temporary directory with automatic cleanup
|
# Create temporary directory with automatic cleanup
|
||||||
# Appends to a shared list so existing EXIT traps are preserved.
|
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
_tools_temp_dirs=()
|
|
||||||
|
|
||||||
_tools_cleanup_temp_dirs() {
|
|
||||||
local d
|
|
||||||
for d in "${_tools_temp_dirs[@]}"; do
|
|
||||||
rm -rf "$d" 2>/dev/null || true
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
_tools_register_temp_cleanup() {
|
|
||||||
[[ "${_TOOLS_TEMP_TRAP_SET:-}" == "1" ]] && return 0
|
|
||||||
_TOOLS_TEMP_TRAP_SET=1
|
|
||||||
local existing
|
|
||||||
existing=$(trap -p EXIT 2>/dev/null | sed -n "s/^trap -- '\\(.*\\)' EXIT/\1/p" || true)
|
|
||||||
if [[ -n "$existing" && "$existing" != "_tools_cleanup_temp_dirs" ]]; then
|
|
||||||
trap "_tools_cleanup_temp_dirs; ${existing}" EXIT ERR INT TERM
|
|
||||||
else
|
|
||||||
trap _tools_cleanup_temp_dirs EXIT ERR INT TERM
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
create_temp_dir() {
|
create_temp_dir() {
|
||||||
local tmp_dir
|
local tmp_dir=$(mktemp -d)
|
||||||
tmp_dir=$(mktemp -d) || return 1
|
# Set trap to cleanup on EXIT, ERR, INT, TERM
|
||||||
_tools_temp_dirs+=("$tmp_dir")
|
trap "rm -rf '$tmp_dir'" EXIT ERR INT TERM
|
||||||
_tools_register_temp_cleanup
|
|
||||||
echo "$tmp_dir"
|
echo "$tmp_dir"
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2072,11 +2049,9 @@ setup_deb822_repo() {
|
|||||||
[[ -n "$enabled" ]] && echo "Enabled: $enabled"
|
[[ -n "$enabled" ]] && echo "Enabled: $enabled"
|
||||||
} >/etc/apt/sources.list.d/${name}.sources
|
} >/etc/apt/sources.list.d/${name}.sources
|
||||||
|
|
||||||
if ! $STD apt update; then
|
$STD apt update || {
|
||||||
msg_error "apt update failed after adding repository: ${name}"
|
msg_warn "apt update failed after adding repository: ${name}"
|
||||||
msg_error "Hint: Verify suite '${suite}' and URI '${repo_url}' are valid for this distribution."
|
}
|
||||||
return 100
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
@@ -8584,10 +8559,13 @@ setup_uv() {
|
|||||||
local UV_BIN="/usr/local/bin/uv"
|
local UV_BIN="/usr/local/bin/uv"
|
||||||
local UVX_BIN="/usr/local/bin/uvx"
|
local UVX_BIN="/usr/local/bin/uvx"
|
||||||
local TMP_DIR=$(mktemp -d)
|
local TMP_DIR=$(mktemp -d)
|
||||||
|
local CACHED_VERSION
|
||||||
|
|
||||||
# trap for TMP Cleanup
|
# trap for TMP Cleanup
|
||||||
trap "rm -rf '$TMP_DIR'" EXIT
|
trap "rm -rf '$TMP_DIR'" EXIT
|
||||||
|
|
||||||
|
CACHED_VERSION=$(get_cached_version "uv")
|
||||||
|
|
||||||
# Architecture Detection
|
# Architecture Detection
|
||||||
local ARCH=$(uname -m)
|
local ARCH=$(uname -m)
|
||||||
local OS_TYPE=""
|
local OS_TYPE=""
|
||||||
|
|||||||
Reference in New Issue
Block a user